﻿using DongFangGuoKai.WMSPlatform.Domain.HZJLYModel;
using DongFangGuoKai.WMSPlatform.Domain.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;

namespace DongFangGuoKai.WMSPlatform.Core
{
    public partial class WMSPlatformContext : DbContext
    {
        public WMSPlatformContext()
        {
        }

        public WMSPlatformContext(DbContextOptions<WMSPlatformContext> options)
            : base(options)
        {
        }
        #region DbSet


        public virtual DbSet<TAction> TActions { get; set; } = null!;
        public virtual DbSet<TAgvInstruct> TAgvInstructs { get; set; } = null!;
        public virtual DbSet<TArea> TAreas { get; set; } = null!;
        public virtual DbSet<TAreaOpen> TAreaOpens { get; set; } = null!;
        public virtual DbSet<TAuditRecord> TAuditRecords { get; set; } = null!;
        public virtual DbSet<TBarCodeRule> TBarCodeRules { get; set; } = null!;
        public virtual DbSet<TCachePort> TCachePorts { get; set; } = null!;
        public virtual DbSet<TCarrier> TCarriers { get; set; } = null!;
        public virtual DbSet<TCell> TCells { get; set; } = null!;
        public virtual DbSet<TCompany> TCompanies { get; set; } = null!;
        public virtual DbSet<TCustomer> TCustomers { get; set; } = null!;
        public virtual DbSet<TDepartment> TDepartments { get; set; } = null!;
        public virtual DbSet<TDepartmentOwner> TDepartmentOwners { get; set; } = null!;
        public virtual DbSet<TDevice> TDevices { get; set; } = null!;
        public virtual DbSet<TDictItem> TDictItems { get; set; } = null!;
        public virtual DbSet<TDictType> TDictTypes { get; set; } = null!;
        public virtual DbSet<TDisasterLevel> TDisasterLevels { get; set; } = null!;
        public virtual DbSet<TDisasterMaterial> TDisasterMaterials { get; set; } = null!;
        public virtual DbSet<TErrorLog> TErrorLogs { get; set; } = null!;
        public virtual DbSet<TInstruct> TInstructs { get; set; } = null!;
        public virtual DbSet<TInterfaceLog> TInterfaceLogs { get; set; } = null!;
        public virtual DbSet<TInventory> TInventories { get; set; } = null!;
        public virtual DbSet<TInventoryAdjust> TInventoryAdjusts { get; set; } = null!;
        public virtual DbSet<TInventoryDetail> TInventoryDetails { get; set; } = null!;
        public virtual DbSet<TInventoryLog> TInventoryLogs { get; set; } = null!;
        public virtual DbSet<TInventoryPallet> TInventoryPallets { get; set; } = null!;
        public virtual DbSet<TInventoryst> TInventorysts { get; set; } = null!;
        public virtual DbSet<TLocation> TLocations { get; set; } = null!;
        public virtual DbSet<TLog> TLogs { get; set; } = null!;
        public virtual DbSet<TMaterial> TMaterials { get; set; } = null!;
        public virtual DbSet<TMaterialBarcode> TMaterialBarcodes { get; set; } = null!;
        public virtual DbSet<TMaterialCategory> TMaterialCategories { get; set; } = null!;
        public virtual DbSet<TMaterialExtDatum> TMaterialExtData { get; set; } = null!;
        public virtual DbSet<TMaterialExtField> TMaterialExtFields { get; set; } = null!;
        public virtual DbSet<TMaterialGroup> TMaterialGroups { get; set; } = null!;
        public virtual DbSet<TMaterialKey> TMaterialKeys { get; set; } = null!;
        public virtual DbSet<TMaterialPackage> TMaterialPackages { get; set; } = null!;
        public virtual DbSet<TMaterialWiki> TMaterialWikis { get; set; } = null!;
        public virtual DbSet<TMaterialWikiFile> TMaterialWikiFiles { get; set; } = null!;
        public virtual DbSet<TMenu> TMenus { get; set; } = null!;
        public virtual DbSet<TMenuAction> TMenuActions { get; set; } = null!;
        public virtual DbSet<TMultPallet> TMultPallets { get; set; } = null!;
        public virtual DbSet<TOwner> TOwners { get; set; } = null!;
        public virtual DbSet<TPackageDetail> TPackageDetails { get; set; } = null!;
        public virtual DbSet<TPallet> TPallets { get; set; } = null!;
        public virtual DbSet<TPalletMoveRecord> TPalletMoveRecords { get; set; } = null!;
        public virtual DbSet<TPath> TPaths { get; set; } = null!;
        public virtual DbSet<TPickingOrder> TPickingOrders { get; set; } = null!;
        public virtual DbSet<TPickingOrderDetail> TPickingOrderDetails { get; set; } = null!;
        public virtual DbSet<TPickingStationDataDetail> TPickingStationDataDetails { get; set; } = null!;
        public virtual DbSet<TPickingStationDatum> TPickingStationData { get; set; } = null!;
        public virtual DbSet<TPlatform> TPlatforms { get; set; } = null!;
        public virtual DbSet<TPlatformSet> TPlatformSets { get; set; } = null!;
        public virtual DbSet<TPutawayOrder> TPutawayOrders { get; set; } = null!;
        public virtual DbSet<TPutawayOrderDetail> TPutawayOrderDetails { get; set; } = null!;
        public virtual DbSet<TReceivingBill> TReceivingBills { get; set; } = null!;
        public virtual DbSet<TReceivingBillDetail> TReceivingBillDetails { get; set; } = null!;
        public virtual DbSet<TReceivingGoodsDetail> TReceivingGoodsDetails { get; set; } = null!;
        public virtual DbSet<TReceivingOrderDetail> TReceivingOrderDetails { get; set; } = null!;
        public virtual DbSet<TRole> TRoles { get; set; } = null!;
        public virtual DbSet<TRoleMenuAction> TRoleMenuActions { get; set; } = null!;
        public virtual DbSet<TRoleWarehouse> TRoleWarehouses { get; set; } = null!;
        public virtual DbSet<TRouteway> TRouteways { get; set; } = null!;
        public virtual DbSet<TScannedPackageDetail> TScannedPackageDetails { get; set; } = null!;
        public virtual DbSet<TScheduledTask> TScheduledTasks { get; set; } = null!;
        public virtual DbSet<TShelf> TShelves { get; set; } = null!;
        public virtual DbSet<TShippingGoodsDetail> TShippingGoodsDetails { get; set; } = null!;
        public virtual DbSet<TShippingLockCell> TShippingLockCells { get; set; } = null!;
        public virtual DbSet<TShippingOrderDetail> TShippingOrderDetails { get; set; } = null!;
        public virtual DbSet<TStackingStorage> TStackingStorages { get; set; } = null!;
        public virtual DbSet<TStackingStorageDetail> TStackingStoragesDetail { get; set; } = null!;
        public virtual DbSet<TStation> TStations { get; set; } = null!;
        public virtual DbSet<TStationDatum> TStationData { get; set; } = null!;
        public virtual DbSet<TStationRouteway> TStationRouteways { get; set; } = null!;
        public virtual DbSet<TStocktakeGoodsDetail> TStocktakeGoodsDetails { get; set; } = null!;
        public virtual DbSet<TStocktakeResultGoodsDetail> TStocktakeResultGoodsDetails { get; set; } = null!;
        public virtual DbSet<TStocktakeResultRecord> TStocktakeResultRecords { get; set; } = null!;
        public virtual DbSet<TStocktakingOrder> TStocktakingOrders { get; set; } = null!;
        public virtual DbSet<TStocktakingOrderDetail> TStocktakingOrderDetails { get; set; } = null!;
        public virtual DbSet<TStocktakingPlan> TStocktakingPlans { get; set; } = null!;
        public virtual DbSet<TStocktakingStrategy> TStocktakingStrategies { get; set; } = null!;
        public virtual DbSet<TStrategy> TStrategies { get; set; } = null!;
        public virtual DbSet<TSupplier> TSuppliers { get; set; } = null!;
        public virtual DbSet<TTaskManage> TTaskManages { get; set; } = null!;
        public virtual DbSet<TTaskStock> TTaskStocks { get; set; } = null!;
        public virtual DbSet<TTaskStockDetail> TTaskStockDetails { get; set; } = null!;
        public virtual DbSet<TTransferBinGoodsDetail> TTransferBinGoodsDetails { get; set; } = null!;
        public virtual DbSet<TTransferBinOrder> TTransferBinOrders { get; set; } = null!;
        public virtual DbSet<TTransferBinOrderDetail> TTransferBinOrderDetails { get; set; } = null!;
        public virtual DbSet<TUnitConvertFigre> TUnitConvertFigres { get; set; } = null!;
        public virtual DbSet<TUnstackDatum> TUnstackData { get; set; } = null!;
        public virtual DbSet<TUser> TUsers { get; set; } = null!;
        public virtual DbSet<TUserRole> TUserRoles { get; set; } = null!;
        public virtual DbSet<TWarehouse> TWarehouses { get; set; } = null!;
        public virtual DbSet<TWaveOrder> TWaveOrders { get; set; } = null!;
        public virtual DbSet<TWorkDocument> TWorkDocuments { get; set; } = null!;
        public virtual DbSet<Temp> Temps { get; set; } = null!;
        public virtual DbSet<SpreadWalls> SpreadWalls { get; set; } = null!;
        public virtual DbSet<UserColor> UserColors { get; set; } = null!;
        public virtual DbSet<TQueceRecard> QueceRecards { get; set; } = null!;

        public virtual DbSet<FullBoxRecord> FullBoxRecords { get; set; } = null;

        public virtual DbSet<TCabinetCellTemp> CabinetCellTemps { get; set; } = null!;



        //public virtual DbSet<BoxMaterial> BoxMaterials { get; set; } = null!;
        #endregion
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            if (!optionsBuilder.IsConfigured)
            {
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263.

                //神通
                //optionsBuilder.UseSql("Server=10.10.1.38;Port=2003;User Id=DBO;Password=123456;Database=OSRDB;");

                //SqlServer
                optionsBuilder.UseSqlServer("Data Source=10.10.23.31\\MSSQLSERVER01,1455;Initial Catalog=WMSPlatform;User ID=sa;Password=sa;Trust Server Certificate=True;");

                //达梦
                //optionsBuilder.UseDm("Server=10.10.1.38;User='SYSDBA';Password=SYSDBA;Database=WMSDBA;");


            }

            #region 打印SQL语句
            // NuGet 程序包：Microsoft.Extensions.Logging.Console
            optionsBuilder.UseLoggerFactory(LoggerFactory.Create(builder =>
            {
                builder.AddConsole();
            }));
            #endregion
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<TAction>(entity =>
            {
                entity.ToTable("t_Action");

                entity.HasComment("操作按钮表");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.ActionCode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("操作编码");

                entity.Property(e => e.ActionName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("操作名称");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人姓名");

                entity.Property(e => e.CssClassName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("样式名称");

                entity.Property(e => e.DisplayOrder).HasComment("排序号");

                entity.Property(e => e.Icon)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("图标");

                entity.Property(e => e.Method)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("方法名称");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改用户名称");

                entity.Property(e => e.Position).HasComment("显示位置 ：1-表单内；2-表单上");

                entity.Property(e => e.Remark)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("说明");

                entity.Property(e => e.Status).HasComment("状态：0-禁用；1-启用");
            });

            modelBuilder.Entity<TAgvInstruct>(entity =>
            {
                entity.ToTable("t_AgvInstruct");

                entity.HasComment("AGV请求指令");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(20)
                    .HasComment("创建人");

                entity.Property(e => e.RequestId)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("请求Id");

                entity.Property(e => e.RequestUrl)
                    .HasMaxLength(5000)
                    .IsUnicode(false)
                    .HasComment("请求地址");

                entity.Property(e => e.RequstBody)
                    .HasColumnType("text")
                    .HasComment("请求body");

                entity.Property(e => e.RequstType).HasComment("请求类型");

                entity.Property(e => e.Respone)
                    .HasColumnType("text")
                    .HasComment("返回接口");

                entity.Property(e => e.RetryTimes).HasComment("重试次数");

                entity.Property(e => e.Success).HasComment("是否成功");
            });

            modelBuilder.Entity<TArea>(entity =>
            {
                entity.ToTable("t_Area");

                entity.HasComment("库区");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.BuiltArea)
                    .HasColumnType("decimal(18, 2)")
                    .HasComment("库区面积");

                entity.Property(e => e.Code)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("库区编码");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.DisplayOrder)
                    .HasDefaultValueSql("((1))")
                    .HasComment("排序号");

                entity.Property(e => e.Erpcode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasColumnName("ERPCode")
                    .HasComment("对应ERP系统的库区编码");

                entity.Property(e => e.IsRealArea)
                    .HasDefaultValueSql("((1))")
                    .HasComment("是否物理库区");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改人");

                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库区名称");

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.ShelfCount).HasDefaultValueSql("((0))");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((1))")
                    .HasComment("状态：0-禁用；1-正常；");

                entity.Property(e => e.TypeId).HasComment("类型Id");

                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("类型名称");

                entity.Property(e => e.WhCode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("库房编码");

                entity.Property(e => e.WhId).HasComment("库房Id");

                entity.Property(e => e.WhName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库房名称");
            });

            modelBuilder.Entity<TAreaOpen>(entity =>
            {
                entity.ToTable("t_AreaOpen");

                entity.Property(e => e.AreaAgvname)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasComment("库口agv名称");

                entity.Property(e => e.AreaWcsname)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasColumnName("AreaWCSname")
                    .HasComment("库口wcs名称");

                entity.Property(e => e.Areastate)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasColumnName("areastate");
            });

            modelBuilder.Entity<TAuditRecord>(entity =>
            {
                entity.ToTable("t_AuditRecord");

                entity.HasComment("审核记录表");

                entity.Property(e => e.Id).HasComment("审核记录Id");

                entity.Property(e => e.AuditStatus)
                    .HasDefaultValueSql("((0))")
                    .HasComment("审核状态：0:未处理;1:通过;2:未通过");

                entity.Property(e => e.AuditTime)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("审核时间");

                entity.Property(e => e.AuditUserId).HasComment("审核人用户Id");

                entity.Property(e => e.AuditUserName)
                    .HasMaxLength(50)
                    .HasComment("审核人姓名");

                entity.Property(e => e.AuditUserRealName)
                    .HasMaxLength(50)
                    .HasComment("审核用户真实姓名");

                entity.Property(e => e.ModuleName).HasMaxLength(50);

                entity.Property(e => e.RecordId).HasComment("记录Id");

                entity.Property(e => e.RecordType).HasComment("记录类型：1-入库单审核；2-出库单审核；4-收货单审核");

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .HasComment("备注：不通过时，为不通过原因");
            });

            modelBuilder.Entity<TBarCodeRule>(entity =>
            {
                entity.ToTable("t_BarCodeRules");

                entity.HasComment("编码规则");

                entity.Property(e => e.Id).HasComment("自增Id");

                entity.Property(e => e.BarCodeRules)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("条码规则");

                entity.Property(e => e.Code)
                    .HasMaxLength(5)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(20)
                    .HasComment("创建人");

                entity.Property(e => e.IsEnable).HasComment("是否启用");

                entity.Property(e => e.MaxNumber).HasComment("最大值");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改人Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(20)
                    .HasComment("修改人");

                entity.Property(e => e.Name)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("编码规则名称");

                entity.Property(e => e.Number).HasComment("流水号");

                entity.Property(e => e.NumberLength).HasComment("流水号位数");

                entity.Property(e => e.RuleDescription)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("规则描述");

                entity.Property(e => e.Sample)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("序列号样例");

                entity.Property(e => e.StartNumber).HasComment("流水号起始");

                entity.Property(e => e.Type).HasComment("类型枚举");
            });

            modelBuilder.Entity<TCachePort>(entity =>
            {
                entity.ToTable("t_CachePort");

                entity.HasComment("缓存口");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.AreaType)
                    .HasDefaultValueSql("((1))")
                    .HasComment("区域类型：1-入库区;2-出库区;3-异常区");

                entity.Property(e => e.Code)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("编码");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.DisplayOrder)
                    .HasDefaultValueSql("((1))")
                    .HasComment("排序号");

                entity.Property(e => e.IsUsed).HasComment("是否有货");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改人Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改人");

                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("名称");

                entity.Property(e => e.StackingStorageId).HasComment("当前缓存口占用垛信息");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((1))")
                    .HasComment("状态：0-禁用；1-启用；");

                entity.Property(e => e.WorkMode)
                    .HasDefaultValueSql("((1))")
                    .HasComment("作业模式：1-全入；2-全出模式；3-左出右入；4-左入右出。");
            });

            modelBuilder.Entity<TCarrier>(entity =>
            {
                entity.ToTable("t_Carrier");

                entity.HasComment("承运商");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.AddrDetail)
                    .HasMaxLength(128)
                    .IsUnicode(false)
                    .HasComment("承运商地址");

                entity.Property(e => e.Code)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("承运商编码");

                entity.Property(e => e.Contact)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人");

                entity.Property(e => e.Contact1)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人1");

                entity.Property(e => e.Contact1Mobile)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("联系人1电话");

                entity.Property(e => e.ContactMobile)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("联系电话");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建用户Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建用户名");

                entity.Property(e => e.DisplayOrder).HasComment("排序号");

                entity.Property(e => e.Email)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("邮箱");

                entity.Property(e => e.Fax)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("传真");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("创建用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建用户名称");

                entity.Property(e => e.Name)
                    .HasMaxLength(128)
                    .IsUnicode(false)
                    .HasComment("承运商名称");

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.TypeId).HasComment("分类Id:对应字典项Id");

                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("分类名称：对应字典项名称");
            });

            modelBuilder.Entity<TCell>(entity =>
            {
                entity.ToTable("t_Cell");

                entity.HasComment("仓位");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.AreaCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.AreaId).HasComment("库区Id");

                entity.Property(e => e.AreaName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.BusinessType).HasComment("当前业务类型：0-无；1-入库；2-出库；3-盘点；");

                entity.Property(e => e.CellType).HasDefaultValueSql("((1))");

                entity.Property(e => e.Code)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("仓位编码");

                entity.Property(e => e.ColumnNo)
                    .HasColumnName("ColumnNO")
                    .HasComment("列号");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.DepthIndex).HasComment("深度：0:代表一深位、1:代表二深位、2:代表三深位、3:代表四深位；当项目用不上深度时，该值赋值0");

                entity.Property(e => e.DistanceValue).HasColumnType("decimal(18, 13)");

                entity.Property(e => e.Erpcode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasColumnName("ERPCode")
                    .HasComment("ERP仓位编码");

                entity.Property(e => e.FullStatus).HasComment("满仓状态：0-空仓；1-满仓；2-不满仓");

                entity.Property(e => e.HeightType).HasDefaultValueSql("((3))");

                entity.Property(e => e.IsLock).HasComment("是否锁定");

                entity.Property(e => e.IsMaxDepth)
                    .HasDefaultValueSql("((1))")
                    .HasComment("是否为最深度的仓位");

                entity.Property(e => e.LayerNo)
                    .HasColumnName("LayerNO")
                    .HasComment("层号");

                entity.Property(e => e.LineNo)
                    .HasColumnName("LineNO")
                    .HasComment("排号");

                entity.Property(e => e.LogicalPartCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.LogicalPartName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改人");

                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("仓位名称");

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.RoutewayId).HasComment("巷道Id");

                entity.Property(e => e.ShelfCode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("货架编码");

                entity.Property(e => e.ShelfId).HasComment("货架Id");

                entity.Property(e => e.ShelfName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货架名称");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((1))")
                    .HasComment("状态：0-禁用；1-正常");

                entity.Property(e => e.WhCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.WhId).HasComment("库房Id");

                entity.Property(e => e.WhName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<TCompany>(entity =>
            {
                entity.ToTable("t_Company");

                entity.HasComment("公司");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.AddrDetail)
                    .HasMaxLength(60)
                    .IsUnicode(false)
                    .HasComment("公司地址");

                entity.Property(e => e.Code)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("公司编码");

                entity.Property(e => e.Contact)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人");

                entity.Property(e => e.ContactMobile)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("联系人手机号");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人名称");

                entity.Property(e => e.DisplayOrder)
                    .HasDefaultValueSql("((1))")
                    .HasComment("排序号");

                entity.Property(e => e.Email)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人邮箱");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改用户名称");

                entity.Property(e => e.Name)
                    .HasMaxLength(60)
                    .IsUnicode(false)
                    .HasComment("公司名称");

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.Tel)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("联系电话");

                entity.Property(e => e.TypeId).HasComment("分类Id：对应字典项Id");

                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("分类名称：对应字典项名称");
            });

            modelBuilder.Entity<TCustomer>(entity =>
            {
                entity.ToTable("t_Customer");

                entity.HasComment("客户");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.AddrDetail)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("客户地址");

                entity.Property(e => e.Code)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("客户编码");

                entity.Property(e => e.Contact)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人1");

                entity.Property(e => e.ContactMobile)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("联系人1手机");

                entity.Property(e => e.ContractNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("ContractNO")
                    .HasComment("合同号");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建用户Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建用户名");

                entity.Property(e => e.DisplayOrder)
                    .HasDefaultValueSql("((1))")
                    .HasComment("排序号");

                entity.Property(e => e.Email)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("邮箱");

                entity.Property(e => e.MobilePhone)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("手机号");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改用户名称");

                entity.Property(e => e.Name)
                    .HasMaxLength(60)
                    .IsUnicode(false)
                    .HasComment("客户名称");

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.ResponsiblePerson)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("责任人");

                entity.Property(e => e.Tel)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("电话");

                entity.Property(e => e.TypeId).HasComment("客户分类Id:对应字典项Id");

                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("分类名称：对应字典项名称");
            });

            modelBuilder.Entity<TDepartment>(entity =>
            {
                entity.ToTable("t_Department");

                entity.HasComment("部门");

                entity.Property(e => e.Contact)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人");

                entity.Property(e => e.ContactMobile)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("联系电话");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建用户Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建用户名");

                entity.Property(e => e.DepartmentCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("部门代码");

                entity.Property(e => e.DepartmentName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("部门名称");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("创建用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建用户名称");

                entity.Property(e => e.ParentId)
                    .HasDefaultValueSql("((0))")
                    .HasComment("上级部门Id");

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("备注");
            });

            modelBuilder.Entity<TDepartmentOwner>(entity =>
            {
                entity.ToTable("t_DepartmentOwner");
            });

            modelBuilder.Entity<TDevice>(entity =>
            {
                entity.ToTable("t_Device");

                entity.HasComment("设备");

                entity.Property(e => e.Id).HasComment("设备Id");

                entity.Property(e => e.Code)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("设备编码");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.DeviceType)
                    .HasDefaultValueSql("((1))")
                    .HasComment("设备类型：1-AGV");

                entity.Property(e => e.ExceptionDate)
                    .HasColumnType("datetime")
                    .HasComment("异常时间");

                entity.Property(e => e.ExceptionMsg)
                    .HasMaxLength(200)
                    .HasComment("异常说明");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改人Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改人");

                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("设备名称");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((1))")
                    .HasComment("状态：0-禁用；1-正常；2-异常");

                entity.Property(e => e.WarehouseCode)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.WarehouseName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<TDictItem>(entity =>
            {
                entity.ToTable("t_DictItem");

                entity.HasComment("字典项");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人姓名");

                entity.Property(e => e.DisplayOrder)
                    .HasDefaultValueSql("((1))")
                    .HasComment("排序号");

                entity.Property(e => e.IsDefault).HasDefaultValueSql("((0))");

                entity.Property(e => e.IsEnd).HasDefaultValueSql("((1))");

                entity.Property(e => e.ItemCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("项编码");

                entity.Property(e => e.ItemName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("项名称");

                entity.Property(e => e.ItemValue).HasComment("项值");

                entity.Property(e => e.LevelIndex)
                    .HasDefaultValueSql("((1))")
                    .HasComment("层级");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改用户名称");

                entity.Property(e => e.ParentId)
                    .HasDefaultValueSql("((0))")
                    .HasComment("父级Id");

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.TypeCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.TypeId).HasComment("分类Id");
            });

            modelBuilder.Entity<TDictType>(entity =>
            {
                entity.ToTable("t_DictType");

                entity.HasComment("数据字典");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人姓名");

                entity.Property(e => e.DisplayOrder)
                    .HasDefaultValueSql("((1))")
                    .HasComment("排序号");

                entity.Property(e => e.IsTree).HasComment("是否树形结构");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改用户名称");

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.TypeCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("类型编码");

                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("类型名称");
            });

            modelBuilder.Entity<TDisasterLevel>(entity =>
            {
                entity.ToTable("t_DisasterLevel");

                entity.HasComment("灾情等级");

                entity.Property(e => e.Id).HasComment("自增Id");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人ID");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(20)
                    .HasComment("创建人");

                entity.Property(e => e.Level).HasComment("等级");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改人Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(20)
                    .HasComment("修改人");

                entity.Property(e => e.Name)
                    .HasMaxLength(20)
                    .HasComment("名称");

                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .HasComment("说明");

                entity.Property(e => e.Season).HasComment("季节");

                entity.Property(e => e.Type).HasComment("类型");
            });

            modelBuilder.Entity<TDisasterMaterial>(entity =>
            {
                entity.ToTable("t_DisasterMaterial");

                entity.HasComment("灾情物资");

                entity.Property(e => e.Id).HasComment("自增Id");

                entity.Property(e => e.DisasterLevelId).HasComment("灾情等级");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .HasComment("物资编码");

                entity.Property(e => e.MaterialId).HasComment("物资Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .HasComment("物资名称");

                entity.Property(e => e.OutQuantity).HasComment("出库数量");
            });

            modelBuilder.Entity<TErrorLog>(entity =>
            {
                entity.ToTable("t_ErrorLog");

                entity.HasComment("异常日志");

                entity.Property(e => e.Id).HasComment("自增ID");

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.ErrorExcetionMsg)
                    .HasColumnType("text")
                    .HasComment("异常消息");

                entity.Property(e => e.HostName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("电脑名称");

                entity.Property(e => e.Ip)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("IP")
                    .HasComment("IP地址");

                entity.Property(e => e.RequestBody)
                    .HasColumnType("text")
                    .HasComment("请求内容");

                entity.Property(e => e.RequestUrl)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("请求地址");

                entity.Property(e => e.Response)
                    .HasColumnType("text")
                    .HasComment("请求返回");

                entity.Property(e => e.Type).HasComment("0：Wms，1:PDA，2WMS");
            });

            modelBuilder.Entity<TInstruct>(entity =>
            {
                entity.ToTable("t_Instruct");

                entity.HasComment("指令记录");

                entity.Property(e => e.Id).HasComment("指令Id");

                entity.Property(e => e.Action).HasDefaultValueSql("((0))");

                entity.Property(e => e.BusinessGroupId)
                    .HasDefaultValueSql("(newid())")
                    .HasComment("业务分组Id");

                entity.Property(e => e.BusinessType).HasComment("业务类型");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.DeviceCode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.EndTime)
                    .HasColumnType("datetime")
                    .HasComment("指令完成时间");

                entity.Property(e => e.ExpectedToLocation)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("预计目的地址");

                entity.Property(e => e.FinishedQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("FinishedQTY")
                    .HasDefaultValueSql("((0))");

                entity.Property(e => e.FromLocation)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("源位置：可以是货位或者站台编号");

                entity.Property(e => e.InstructIndex)
                    .HasDefaultValueSql("((1))")
                    .HasComment("指令执行顺序");

                entity.Property(e => e.InstructType).HasComment("指令类型：1-上架、2-下架、3-移位、4-盘点指令");

                entity.Property(e => e.IsSuspend).HasDefaultValueSql("((0))");

                entity.Property(e => e.LogicalCellAddr)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(128)
                    .IsUnicode(false)
                    .HasComment("按项目需求，客户定制的垛条码");

                entity.Property(e => e.Priority)
                    .HasDefaultValueSql("((1))")
                    .HasComment("指令优先级");

                entity.Property(e => e.Qty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("QTY")
                    .HasComment("任务数量");

                entity.Property(e => e.RefCellCode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ScanedBarcode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("WCS上报的扫描到的条码，可能与垛号不一样，用于指令完成快速查询");

                entity.Property(e => e.StackingStorageId).HasComment("垛入库存储Id");

                entity.Property(e => e.StartTime)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("指令开始时间");

                entity.Property(e => e.Status).HasComment("指令状态：0-创建，1-待执行，2-执行中，3-搬运完成，4-处理完成，5-执行异常，6-已强制取消任务");

                entity.Property(e => e.ToLocation)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("实际目标位置");

                entity.Property(e => e.WarehouseCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.WorkDeviceType)
                    .HasDefaultValueSql("((1))")
                    .HasComment("工作设备类型：1-线体;2-AGV");

            });

            modelBuilder.Entity<TInterfaceLog>(entity =>
            {
                entity.ToTable("t_InterfaceLog");

                entity.Property(e => e.Id).HasComment("Id主键");

                entity.Property(e => e.CallMillisecond).HasComment("请求耗时毫秒数");

                entity.Property(e => e.CallWay)
                    .HasDefaultValueSql("((1))")
                    .HasComment("请求方式：1-Get;2-Post");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Direction).HasDefaultValueSql("((1))");

                entity.Property(e => e.ErrorMsg)
                    .HasMaxLength(400)
                    .IsUnicode(false)
                    .HasComment("错误信息");

                entity.Property(e => e.ExecBusinessCalss)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ExecDate)
                    .HasColumnType("datetime")
                    .HasComment("执行时间");

                entity.Property(e => e.ExecMillisecond).HasComment("执行耗时毫秒数");

                entity.Property(e => e.FinishedDate)
                    .HasColumnType("datetime")
                    .HasComment("完成时间");

                entity.Property(e => e.InParam)
                    .HasColumnType("text")
                    .HasComment("入参");

                entity.Property(e => e.LogType).HasDefaultValueSql("((1))");

                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("接口名称");

                entity.Property(e => e.OutParam)
                    .HasColumnType("text")
                    .HasComment("出参");

                entity.Property(e => e.ReExecTimes)
                    .HasDefaultValueSql("((0))")
                    .HasComment("重复执行次数");

                entity.Property(e => e.RefInstructId).HasComment("关联指令Id");

                entity.Property(e => e.RefTaskId).HasComment("关联任务Id");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((1))")
                    .HasComment("状态：0-待执行；1-成功；2-验证失败；3-执行失败");

                entity.Property(e => e.Url)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("接口地址");
            });

            modelBuilder.Entity<TInventory>(entity =>
            {
                entity.ToTable("t_Inventory");

                entity.HasComment("库存表");

                entity.Property(e => e.AllocateQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("AllocateQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("已分配数量");

                entity.Property(e => e.AreaCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.AreaId).HasComment("库区Id");

                entity.Property(e => e.AreaName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库区名称");

                entity.Property(e => e.AvailableQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("AvailableQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("可用库存数量");

                entity.Property(e => e.BatchNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BatchNO");

                entity.Property(e => e.BatchNoExplain)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.BillType).HasComment("单据类型Id");

                entity.Property(e => e.BusinessType).HasComment("当前业务类型");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.DeptCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("部门编码");

                entity.Property(e => e.DeptName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("部门名称");

                entity.Property(e => e.DisOrderLineNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("DisOrderLineNO")
                    .HasComment("发货单行号");

                entity.Property(e => e.DisOrderNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("DisOrderNO")
                    .HasComment("发货单号");

                entity.Property(e => e.ErplocationCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasColumnName("ERPLocationCode");

                entity.Property(e => e.ExpireDate)
                    .HasColumnType("datetime")
                    .HasComment("有效时间");

                entity.Property(e => e.HasSkuDetail).HasComment("是否有货号详情");

                entity.Property(e => e.InStockDate)
                    .HasColumnType("datetime")
                    .HasComment("入库时间");

                entity.Property(e => e.IsLock)
                    .HasDefaultValueSql("((0))")
                    .HasComment("是否锁定：false-未锁定；true-锁定");

                entity.Property(e => e.IsMultPallet).HasDefaultValueSql("((0))");

                entity.Property(e => e.LocationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("仓位编码");

                entity.Property(e => e.LocationColumnNo)
                    .HasColumnName("LocationColumnNO")
                    .HasComment("列号");

                entity.Property(e => e.LocationDepth).HasComment("垛所在仓位深度");

                entity.Property(e => e.LocationDistanceValue).HasColumnType("decimal(18, 13)");

                entity.Property(e => e.LocationId).HasComment("仓位Id");

                entity.Property(e => e.LocationLayerNo)
                    .HasColumnName("LocationLayerNO")
                    .HasComment("层号");

                entity.Property(e => e.LocationLineNo)
                    .HasColumnName("LocationLineNO")
                    .HasComment("排号");

                entity.Property(e => e.LocationName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.LogicalPartCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.MaterialCategoryName)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料号");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialKeyId).HasComment("物料批次信息Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.MaterialTypeCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.MaterialTypeId).HasComment("物料类型Id");

                entity.Property(e => e.MaterialTypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料类型");

                entity.Property(e => e.OutFactoryDate).HasColumnType("datetime");

                entity.Property(e => e.OwnerId).HasComment("货主Id");

                entity.Property(e => e.OwnerName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货主");

                entity.Property(e => e.PackQty)
                    .HasColumnName("PackQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("包装数量");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(128)
                    .IsUnicode(false)
                    .HasComment("垛条码");

                entity.Property(e => e.ParentPalletBarcode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.PickedQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("PickedQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("下架数量");

                entity.Property(e => e.Price).HasColumnType("decimal(12, 2)");

                entity.Property(e => e.ProduceFactory)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ProductDate)
                    .HasColumnType("datetime")
                    .HasComment("生产日期");

                entity.Property(e => e.PurOrderLineNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("PurOrderLineNO");

                entity.Property(e => e.PurOrderNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("PurOrderNO");

                entity.Property(e => e.PutawayQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("PutawayQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("上架数量");

                entity.Property(e => e.Qadate)
                    .HasColumnType("datetime")
                    .HasColumnName("QADate");

                entity.Property(e => e.QualityState)
                    .HasDefaultValueSql("((1))")
                    .HasComment("质量状态：0-待检；1-合格；2-不合格；");

                entity.Property(e => e.RealHeightType).HasComment("垛实际高度类型");

                entity.Property(e => e.RelatedOrderDetailId).HasComment("关联详情单Id");

                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((0))")
                    .HasComment("库存状态：1-正常库存；2-转移中的库存；3-入库在途；4-出库在途；5-限制使用的库存;6-异常库存;7-预分配库存;8-冻结库存");

                entity.Property(e => e.SupplierId).HasComment("供应商Id");

                entity.Property(e => e.SupplierName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("供应商");

                entity.Property(e => e.TotalPrice).HasColumnType("decimal(12, 2)");

                entity.Property(e => e.UnitId).HasComment("基本单位Id");

                entity.Property(e => e.UnitName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("基本单位");

                entity.Property(e => e.WarehouseCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.WarehouseId).HasComment("库房Id");

                entity.Property(e => e.WarehouseName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库房名称");

                entity.Property(e => e.WoodPalletBarcode)
                    .HasMaxLength(30)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<TInventoryAdjust>(entity =>
            {
                entity.ToTable("t_InventoryAdjust");

                entity.Property(e => e.Id).HasComment("ID");

                entity.Property(e => e.AreaId).HasComment("库区Id");

                entity.Property(e => e.AreaName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库区名称\r\n");

                entity.Property(e => e.BillSn)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BillSN")
                    .HasComment("单据号");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.LocationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("仓位编码");

                entity.Property(e => e.LocationId).HasComment("仓位Id");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料号");

                entity.Property(e => e.MaterialId).HasComment("物料Id\r\n");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称\r\n");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改人");

                entity.Property(e => e.OwnerId).HasComment("货主Id\r\n");

                entity.Property(e => e.OwnerName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货主");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.Qty)
                    .HasColumnType("decimal(18, 3)")
                    .HasComment("调整数量\r\n");

                entity.Property(e => e.Reason)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("调整原因\r\n");

                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.SourceSn)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("SourceSN")
                    .HasComment("来源单据号\r\n");

                entity.Property(e => e.SourceType)
                    .HasDefaultValueSql("((0))")
                    .HasComment("来源单据类型：0-无；10-盘点单；20-手工创建；");

                entity.Property(e => e.Status).HasComment("状态：0-创建；10-已审核；20-已调整；30-取消作废；");

                entity.Property(e => e.WhId).HasComment("仓库Id");

                entity.Property(e => e.WhName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库房名称");
            });

            modelBuilder.Entity<TInventoryDetail>(entity =>
            {
                entity.ToTable("t_InventoryDetail");

                entity.HasComment("库存明细");

                entity.Property(e => e.Id).HasComment("库存明细Id");

                entity.Property(e => e.Barcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货品条码");

                entity.Property(e => e.BarcodeRange)
                    .HasMaxLength(60)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.InventoryId).HasComment("库存Id");

                entity.Property(e => e.IsSku).HasDefaultValueSql("((1))");

                entity.Property(e => e.PackageBarcode)
                    .HasMaxLength(60)
                    .IsUnicode(false)
                    .HasComment("包装条码");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("垛条码");

                entity.Property(e => e.Price).HasColumnType("decimal(12, 2)");

                entity.Property(e => e.SkuNum)
                    .HasColumnType("decimal(18, 3)")
                    .HasDefaultValueSql("((0))");

                entity.Property(e => e.TotalPrice).HasColumnType("decimal(12, 2)");

                entity.Property(e => e.MaterialId)
                  .HasColumnType("bigint")
                   .HasComment("物料Id");

                entity.Property(e => e.MaterialCode)
                   .HasMaxLength(50)
                   .IsUnicode(false)
                   .HasComment("物料号");

                entity.Property(e => e.MaterialName)
                   .HasMaxLength(200)
                   .IsUnicode(false)
                   .HasComment("物料名称");
            });

            modelBuilder.Entity<TInventoryLog>(entity =>
            {
                entity.ToTable("t_InventoryLog");

                entity.HasComment("库存流水");

                entity.Property(e => e.Id).HasComment("编号");

                entity.Property(e => e.AreaId).HasComment("库区ID");

                entity.Property(e => e.AreaName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库区");

                entity.Property(e => e.BaseUnitId).HasComment("基本单元Id");

                entity.Property(e => e.BaseUnitName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("单位名称");

                entity.Property(e => e.BatchNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("批次号");

                entity.Property(e => e.ChangeQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("ChangeQTY")
                    .HasComment("变更数量");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("生成日期");

                entity.Property(e => e.CreateUser)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.CreateUserId).HasComment("创建人");

                entity.Property(e => e.EndQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("EndQTY")
                    .HasComment("最终数量");

                entity.Property(e => e.LocationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("仓位");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("物料编码");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.OwnerId).HasComment("货主Id");

                entity.Property(e => e.OwnerName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货主名称");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(128)
                    .IsUnicode(false)
                    .HasComment("托盘号");

                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.SourceSn)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("SourceSN")
                    .HasComment("来源单号");

                entity.Property(e => e.SourceType).HasComment("来源单据类型：10:-入库；20-出库；30-盘点；40-手工调整；50-库存调整；");

                entity.Property(e => e.StartQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("StartQTY")
                    .HasComment("原始数量");

                entity.Property(e => e.WarehouseId).HasComment("仓库Id");

                entity.Property(e => e.WarehouseName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("仓库名称");
            });

            modelBuilder.Entity<TInventoryPallet>(entity =>
            {
                entity.ToTable("t_InventoryPallet");

                entity.Property(e => e.AreaId).HasComment("库区Id");

                entity.Property(e => e.AreaName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库区名称");

                entity.Property(e => e.BaseUnitId).HasComment("基本单位Id");

                entity.Property(e => e.BaseUnitName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("基本单位");

                entity.Property(e => e.LocationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("仓位编码");

                entity.Property(e => e.LocationId).HasComment("仓位Id");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料号");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.MaterialTypeId).HasComment("物料类型Id");

                entity.Property(e => e.MaterialTypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料类型");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改人");

                entity.Property(e => e.OwnerId).HasComment("货主Id");

                entity.Property(e => e.OwnerName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货主");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(128)
                    .IsUnicode(false)
                    .HasComment("垛条码");

                entity.Property(e => e.Qty)
                    .HasColumnType("decimal(18, 3)")
                    .HasDefaultValueSql("((0))")
                    .HasComment("库存数量");

                entity.Property(e => e.SupplierId).HasComment("供应商Id");

                entity.Property(e => e.SupplierName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("供应商");

                entity.Property(e => e.TypeId).HasComment("库存类型Id");

                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库存类型");

                entity.Property(e => e.WhId).HasComment("WhId");

                entity.Property(e => e.WhName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库房名称");
            });

            modelBuilder.Entity<TInventoryst>(entity =>
            {
                entity.ToTable("t_Inventoryst");

                entity.Property(e => e.BarCode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasColumnName("barCode")
                    .HasComment("托盘码");

                entity.Property(e => e.Cellcode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("仓位编码");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("创建人名称");

                entity.Property(e => e.Number).HasComment("数量");

                entity.Property(e => e.Suppliesname)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasColumnName("suppliesname")
                    .HasComment("物料名称");

                entity.Property(e => e.Suppliesnode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasColumnName("suppliesnode")
                    .HasComment("物料编号");

                entity.Property(e => e.Vessel)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasColumnName("vessel")
                    .HasComment("容器编号");
            });

            modelBuilder.Entity<TLocation>(entity =>
            {
                entity.HasNoKey();

                entity.ToTable("t_Location");

                entity.Property(e => e.Code)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Entrance)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.FullStatus)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Qe)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Qy)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<TLog>(entity =>
            {
                entity.ToTable("t_Log");

                entity.HasComment("日志表");

                entity.Property(e => e.Id).HasComment("主键Id");

                entity.Property(e => e.ActionType).HasComment("操作类型：0-其他；1-登录；2-退出；3-访问；4-新增；5-删除；6-修改；7-提交；8-审核通过；9-审核拒绝；");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.Description)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("日志描述");

                entity.Property(e => e.IpAddressName)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("IP所在地");

                entity.Property(e => e.Ipaddress)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasColumnName("IPAddress")
                    .HasComment("IP地址");

                entity.Property(e => e.LogType).HasComment("日志类型");

                entity.Property(e => e.ModuleName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("日志模块");

                entity.Property(e => e.RealName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("操作用户真实姓名");

                entity.Property(e => e.RecordId).HasComment("记录Id");

                entity.Property(e => e.RecordType).HasComment("记录类型");

                entity.Property(e => e.Status).HasComment("状态");

                entity.Property(e => e.UserName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("操作用户名");

                entity.Property(e => e.UserRemark)
                    .HasMaxLength(500)
                    .HasComment("用户备注");
            });

            modelBuilder.Entity<TMaterial>(entity =>
            {
                entity.ToTable("t_Material");

                entity.HasComment("物料");

                entity.Property(e => e.Id).HasComment("物料Id");

                entity.Property(e => e.Code)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.FullTypeIds)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.FullTypeNames)
                    .HasMaxLength(300)
                    .IsUnicode(false);

                entity.Property(e => e.GrossWeight)
                    .HasColumnType("decimal(18, 2)")
                    .HasComment("毛重");

                entity.Property(e => e.GrossWeightUnitId).HasComment("毛重重量单位Id");

                entity.Property(e => e.GrossWeightUnitName)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("毛重重量单位");

                entity.Property(e => e.Img)
                    .HasMaxLength(255)
                    .IsUnicode(false);

                entity.Property(e => e.MaterialCategoryName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.MaxSafetyStock).HasComment("最大安全库存");

                entity.Property(e => e.MinSafetyStock).HasComment("最小安全库存");

                entity.Property(e => e.ModelSpec)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("型号规格");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改人");

                entity.Property(e => e.Name)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.NetWeight)
                    .HasColumnType("decimal(18, 2)")
                    .HasComment("净重");

                entity.Property(e => e.NetWeightUnitId).HasComment("净重重量单位Id");

                entity.Property(e => e.NetWeightUnitName)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("净重重量单位");

                entity.Property(e => e.OwnerId).HasComment("货主Id");

                entity.Property(e => e.OwnerName)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("描述");

                entity.Property(e => e.TypeCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.TypeId).HasComment("物料类型Id");

                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料类型");

                entity.Property(e => e.UnitId).HasComment("基本单位Id");

                entity.Property(e => e.UnitName)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("基本单位");

                entity.Property(e => e.Volum)
                    .HasColumnType("decimal(18, 2)")
                    .HasComment("体积");

                entity.Property(e => e.VolumUnitId).HasComment("体积单位Id");

                entity.Property(e => e.VolumUnitName)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("体积单位");
            });

            modelBuilder.Entity<TMaterialBarcode>(entity =>
            {
                entity.ToTable("t_MaterialBarcode");

                entity.HasComment("物料条码");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.Barcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("条码号");

                entity.Property(e => e.MaterialId).HasComment("物料Id");
            });

            modelBuilder.Entity<TMaterialCategory>(entity =>
            {
                entity.ToTable("t_MaterialCategory");

                entity.HasComment("物料分类表");

                entity.Property(e => e.Id).HasComment("自增ID");

                entity.Property(e => e.Code)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("创建人姓名");

                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("分类名称");

                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.UpdateDate)
                    .HasColumnType("datetime")
                    .HasComment("更新时间");

                entity.Property(e => e.UpdateUserId).HasComment("更新人Id");

                entity.Property(e => e.UpdateUserName)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("更新人姓名");
            });

            modelBuilder.Entity<TMaterialExtDatum>(entity =>
            {
                entity.ToTable("t_MaterialExtData");

                entity.HasComment("物料扩展数据表");

                entity.Property(e => e.Id).HasComment("数据Id");

                entity.Property(e => e.BindDictTypeId).HasComment("对应字典类型Id，仅数据绑定下拉框用");

                entity.Property(e => e.ControlType)
                    .HasDefaultValueSql("((1))")
                    .HasComment("字段控件类型：1-文本框；2-单选框；3-多选框；4-下拉框；5-多行文本框；6-时间控件");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.DisplayOrder)
                    .HasDefaultValueSql("((1))")
                    .HasComment("排序");

                entity.Property(e => e.FieldCode)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.FieldData)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.FieldId).HasComment("扩展字段Id");

                entity.Property(e => e.FieldName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("字段名称");

                entity.Property(e => e.FieldValues)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.InputWay)
                    .HasDefaultValueSql("((0))")
                    .HasComment("输入方式：0-手动输入或选择；1-绑定数据源");

                entity.Property(e => e.IsTree)
                    .HasDefaultValueSql("((0))")
                    .HasComment("是否下拉树");
            });

            modelBuilder.Entity<TMaterialExtField>(entity =>
            {
                entity.ToTable("t_MaterialExtField");

                entity.HasComment("物料扩展字段表");

                entity.Property(e => e.Id).HasComment("扩展字段Id");

                entity.Property(e => e.BindDictTypeId).HasComment("对应字典类型Id，仅数据绑定下拉框用");

                entity.Property(e => e.BindDictTypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("对应字典类型名称，仅数据绑定下拉框用");

                entity.Property(e => e.ControlType)
                    .HasDefaultValueSql("((1))")
                    .HasComment("字段控件类型：1-文本框；2-单选框；3-多选框；4-下拉框；5-多行文本框；6-时间控件");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.DisplayOrder)
                    .HasDefaultValueSql("((1))")
                    .HasComment("排序");

                entity.Property(e => e.FieldCode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("字段编码");

                entity.Property(e => e.FieldName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("字段名称");

                entity.Property(e => e.FullTypeIds)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("全分类Id,包括父级分类");

                entity.Property(e => e.FullTypeNames)
                    .HasMaxLength(300)
                    .IsUnicode(false)
                    .HasComment("分类全名，包括父分类");

                entity.Property(e => e.InputValues)
                    .HasMaxLength(1000)
                    .HasComment("可选择内容列表，仅手动选择下拉框用；例1-分类1;2-分类2");

                entity.Property(e => e.InputWay)
                    .HasDefaultValueSql("((0))")
                    .HasComment("输入方式：0-手动输入或选择；1-绑定数据源");

                entity.Property(e => e.IsRequired)
                    .HasDefaultValueSql("((0))")
                    .HasComment("是否必填");

                entity.Property(e => e.IsTree).HasComment("是否树形下拉");

                entity.Property(e => e.TypeId).HasComment("分类Id");

                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("分类名称");
            });

            modelBuilder.Entity<TMaterialGroup>(entity =>
            {
                entity.ToTable("t_MaterialGroup");

                entity.HasComment("物料组");

                entity.Property(e => e.Id).HasComment("自增Id");

                entity.Property(e => e.AreaId).HasComment("存储区 预留字段");

                entity.Property(e => e.Code)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("物料组编码");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(20)
                    .HasComment("创建人");

                entity.Property(e => e.Describe)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("描述");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改人Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(20)
                    .HasComment("修改人");

                entity.Property(e => e.Name)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料组名称");
            });

            modelBuilder.Entity<TMaterialKey>(entity =>
            {
                entity.ToTable("t_MaterialKey");

                entity.HasComment("物料批次表");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.BatchNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BatchNO")
                    .HasComment("批次号");

                entity.Property(e => e.ContractNo)
                    .HasMaxLength(60)
                    .IsUnicode(false)
                    .HasColumnName("ContractNO")
                    .HasDefaultValueSql("('')")
                    .HasComment("合同号");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.DeptCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("部门编码");

                entity.Property(e => e.DeptName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("部门名称");

                entity.Property(e => e.ExpireDate)
                    .HasColumnType("datetime")
                    .HasComment("有效期");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.Mblnr)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("MBLNR")
                    .HasComment("物料凭证号");

                entity.Property(e => e.Mjahr)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("MJAHR")
                    .HasComment("物料凭证年度");

                entity.Property(e => e.OutFactoryDate)
                    .HasColumnType("datetime")
                    .HasComment("出厂日期");

                entity.Property(e => e.OutOrderNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("OutOrderNO");

                entity.Property(e => e.OwnerId).HasComment("货主Id");

                entity.Property(e => e.OwnerName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货主");

                entity.Property(e => e.ProOrderNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("ProOrderNO")
                    .HasComment("生产订单号");

                entity.Property(e => e.ProduceFactory)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("生产厂家");

                entity.Property(e => e.ProductDate)
                    .HasColumnType("datetime")
                    .HasComment("生产日期");

                entity.Property(e => e.PurOrderLineNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("PurOrderLineNO")
                    .HasComment("采购订单行号");

                entity.Property(e => e.PurOrderLineType)
                    .HasDefaultValueSql("((0))")
                    .HasComment("采购订单行项目类型：0-无；1-L外协；2-U转储;3-正常采购");

                entity.Property(e => e.PurOrderNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("PurOrderNO")
                    .HasComment("采购订单号");

                entity.Property(e => e.Qadate)
                    .HasColumnType("datetime")
                    .HasColumnName("QADate")
                    .HasComment("质检日期");

                entity.Property(e => e.QualityState)
                    .HasDefaultValueSql("((1))")
                    .HasComment("质量状态：0-待检；1-合格；2-不合格；");

                entity.Property(e => e.SupplierId).HasComment("供应商Id");

                entity.Property(e => e.SupplierName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("供应商");

                entity.Property(e => e.WarehouseCode)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.WarehouseName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Zeile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("ZEILE")
                    .HasComment("物料凭证行项目");
            });

            modelBuilder.Entity<TMaterialPackage>(entity =>
            {
                entity.ToTable("t_MaterialPackage");

                entity.HasComment("物料包装");

                entity.Property(e => e.BaseUnitId).HasComment("基本单位Id");

                entity.Property(e => e.BaseUnitName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("基本单位");

                entity.Property(e => e.ConversionFactor).HasComment("包装数量");

                entity.Property(e => e.EquipType)
                    .HasMaxLength(10)
                    .IsUnicode(false);

                entity.Property(e => e.EquipTypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.FactorBu)
                    .HasColumnName("FactorBU")
                    .HasComment("总计量数");

                entity.Property(e => e.Height).HasComment("高");

                entity.Property(e => e.Length).HasComment("长");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("物料号");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.PackageLevel)
                    .HasDefaultValueSql("((1))")
                    .HasComment("包装等级：1-基本包装;2-二级包装；3-三级包装");

                entity.Property(e => e.PackageUnitId).HasComment("主包装单位Id");

                entity.Property(e => e.PackageUnitName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("主包装单位");

                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .HasComment("包装描述");

                entity.Property(e => e.SubPackageUnitId).HasComment("子包装单位Id");

                entity.Property(e => e.SubPackageUnitName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("子包装单位");

                entity.Property(e => e.Uomqty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("UOMQty")
                    .HasComment("计量数量");

                entity.Property(e => e.Volumn).HasComment("体积");

                entity.Property(e => e.Weight).HasComment("重量");

                entity.Property(e => e.Width).HasComment("宽");
            });

            modelBuilder.Entity<TMaterialWiki>(entity =>
            {
                entity.ToTable("t_MaterialWiki");

                entity.HasComment("物料知识库");

                entity.Property(e => e.Id).HasComment("自增Id");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(20)
                    .HasComment("创建人");

                entity.Property(e => e.Describe)
                    .HasColumnType("text")
                    .HasComment("描述");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料编码");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改人Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(20)
                    .HasComment("修改人");

                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("说明");

                entity.Property(e => e.Title)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("标题");
            });

            modelBuilder.Entity<TMaterialWikiFile>(entity =>
            {
                entity.ToTable("t_MaterialWikiFile");

                entity.Property(e => e.Id).HasComment("自增Id");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(20)
                    .HasComment("创建人");

                entity.Property(e => e.FileName).HasMaxLength(50);

                entity.Property(e => e.FileType).HasComment("文件类型，0:图片1:文件");

                entity.Property(e => e.FileUrl)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("文件路径");

                entity.Property(e => e.MaterialWikiId).HasComment("物料知识库Id");

                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("说明");
            });

            modelBuilder.Entity<TMenu>(entity =>
            {
                entity.ToTable("t_Menu");

                entity.HasComment("菜单表");

                entity.Property(e => e.Id).HasComment("主键Id");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("创建人姓名");

                entity.Property(e => e.DisplayOrder).HasComment("排序号");

                entity.Property(e => e.IsMobile).HasComment("是否移动端");

                entity.Property(e => e.MenuIcon)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("菜单图标");

                entity.Property(e => e.MenuName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("菜单名称");

                entity.Property(e => e.MenuUrl)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("菜单地址");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("修改用户名称");

                entity.Property(e => e.ParentId)
                    .HasDefaultValueSql("((0))")
                    .HasComment("父菜单Id");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((1))")
                    .HasComment("状态：0-禁用；1-启用");
            });

            modelBuilder.Entity<TMenuAction>(entity =>
            {
                entity.ToTable("t_MenuAction");

                entity.HasComment("菜单按钮表");

                entity.Property(e => e.Id).HasComment("主键Id");

                entity.Property(e => e.ActionId).HasComment("操作Id");

                entity.Property(e => e.MenuId).HasComment("菜单Id");
            });

            modelBuilder.Entity<TMultPallet>(entity =>
            {
                entity.ToTable("t_MultPallet");

                entity.Property(e => e.ContractNo)
                    .HasMaxLength(60)
                    .IsUnicode(false)
                    .HasColumnName("ContractNO")
                    .HasComment("合同号");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料编号");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料描述");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.Num)
                    .HasDefaultValueSql("((0))")
                    .HasComment("数量");

                entity.Property(e => e.OwnerCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.OwnerId).HasComment("货主Id");

                entity.Property(e => e.OwnerName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货主");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("托盘号");

                entity.Property(e => e.ProOrderNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("ProOrderNO")
                    .HasComment("生产单号");

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((0))")
                    .HasComment("状态：0-待入库；1-已入库");

                entity.Property(e => e.WoodPalletBarcode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("木托盘号");
            });

            modelBuilder.Entity<TOwner>(entity =>
            {
                entity.ToTable("t_Owner");

                entity.HasComment("货主");

                entity.Property(e => e.Id).HasComment("货主Id");

                entity.Property(e => e.AddrDetail)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("地址");

                entity.Property(e => e.Code)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("货主编码");

                entity.Property(e => e.Contacts)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("联系人");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.Email)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("邮箱");

                entity.Property(e => e.MobilePhone)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("手机号");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改人Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改人");

                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货主名称");

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.ZipCode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("邮编");
            });

            modelBuilder.Entity<TPackageDetail>(entity =>
            {
                entity.ToTable("t_PackageDetail");

                entity.HasComment("货品与包装关系表，容器与容器的关系，容器与货品的关系，货品与货品的关系等记录表");

                entity.Property(e => e.Id).HasComment("明细Id");

                entity.Property(e => e.Barcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料条码：可以是容器条码或货品条码");

                entity.Property(e => e.BarcodeRange)
                    .HasMaxLength(60)
                    .IsUnicode(false);

                entity.Property(e => e.BatchNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BatchNO");

                entity.Property(e => e.ConvertFigre).HasComment("收货最小单位与最小发货单位的转换因子：（收货除以发货单位）。计算公式为：通过物料的计量单位表中与基本单位转换");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.IsStocktake).HasDefaultValueSql("((0))");

                entity.Property(e => e.LayerIndex)
                    .HasDefaultValueSql("((1))")
                    .HasComment("第几层包装：最外层为1");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料号");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialKeyId).HasComment("物料关键字Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.PackageClass)
                    .HasDefaultValueSql("((1))")
                    .HasComment("包装类型：1-容器；2-货品");

                entity.Property(e => e.PackageCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("包装条码");

                entity.Property(e => e.ParentId).HasComment("父包装Id");

                entity.Property(e => e.PositionX).HasComment("该物料所在垛的X坐标：如果为最底层托盘则0");

                entity.Property(e => e.PositionY).HasComment("该物料所在垛的Y坐标：如果为最底层托盘则0");

                entity.Property(e => e.PositionZ).HasComment("该物料所在垛的Z坐标：如果为最底层托盘则0");

                entity.Property(e => e.Qty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("QTY")
                    .HasComment("数量");

                entity.Property(e => e.RelatedOrderDetailId).HasComment("关联单详情Id");

                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.SkuNum).HasColumnType("decimal(18, 3)");

                entity.Property(e => e.StackingStorageId).HasComment("垛存储Id");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((1))")
                    .HasComment("状态：0-失效；1-生效");

                entity.Property(e => e.UnitId).HasComment("物料基本单位Id");

                entity.Property(e => e.UnitName)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("物料基本单位");
            });

            modelBuilder.Entity<TPallet>(entity =>
            {
                entity.ToTable("t_Pallet");

                entity.HasComment("托盘");

                entity.Property(e => e.Id).HasComment("Id");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.DisplayOrder).HasDefaultValueSql("((1))");

                entity.Property(e => e.ErplocationName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("ERPLocationName");

                entity.Property(e => e.LocationCode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("所在货位");

                entity.Property(e => e.LocationName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("启用时间");

                entity.Property(e => e.Opprint).HasColumnName("OPPrint");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("托盘条码");

                entity.Property(e => e.PalletName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("托盘名称");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((1))")
                    .HasComment("状态：0-禁用；1-启用");

                entity.Property(e => e.WarehouseCode)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.WarehouseName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<TPalletMoveRecord>(entity =>
            {
                entity.ToTable("t_PalletMoveRecord");

                entity.Property(e => e.Id).HasComment("托盘移动记录Id");

                entity.Property(e => e.BackFinishedDate)
                    .HasColumnType("datetime")
                    .HasComment("返回完成时间");

                entity.Property(e => e.BackInstructId).HasComment("回原储位指令Id");

                entity.Property(e => e.BackToCellCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("返回储位编码");

                entity.Property(e => e.BackToCellColumnNo)
                    .HasColumnName("BackToCellColumnNO")
                    .HasComment("返回储位列号");

                entity.Property(e => e.BackToCellDepthIndex).HasComment("返回储位深度");

                entity.Property(e => e.BackToCellId).HasComment("返回储位Id");

                entity.Property(e => e.BackToCellLayerNo)
                    .HasColumnName("BackToCellLayerNO")
                    .HasComment("返回储位层号");

                entity.Property(e => e.BackToCellLineNo)
                    .HasColumnName("BackToCellLineNO")
                    .HasComment("返回储位排号");

                entity.Property(e => e.BackToCellName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("返回储位名称");

                entity.Property(e => e.BillType).HasComment("单据类型");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.FromCellCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("原储位编码");

                entity.Property(e => e.FromCellColumnNo)
                    .HasColumnName("FromCellColumnNO")
                    .HasComment("原储位列号");

                entity.Property(e => e.FromCellDepthIndex).HasComment("原储位所在深度");

                entity.Property(e => e.FromCellId).HasComment("原储位Id");

                entity.Property(e => e.FromCellLayerNo)
                    .HasColumnName("FromCellLayerNO")
                    .HasComment("原储位层号");

                entity.Property(e => e.FromCellLineNo)
                    .HasColumnName("FromCellLineNO")
                    .HasComment("原储位排号");

                entity.Property(e => e.FromCellName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("原储位名称");

                entity.Property(e => e.InventoryId).HasComment("库存Id");

                entity.Property(e => e.IsMultPallet).HasDefaultValueSql("((0))");

                entity.Property(e => e.MoveFinishedDate)
                    .HasColumnType("datetime")
                    .HasComment("转移完成时间");

                entity.Property(e => e.MoveInstructId).HasComment("移位指令Id");

                entity.Property(e => e.MoveToCellCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("转移储位编码");

                entity.Property(e => e.MoveToCellColumnNo)
                    .HasColumnName("MoveToCellColumnNO")
                    .HasComment("转移储位列号");

                entity.Property(e => e.MoveToCellDepthIndex).HasComment("转移储位深度");

                entity.Property(e => e.MoveToCellId).HasComment("转移储位Id");

                entity.Property(e => e.MoveToCellLayerNo)
                    .HasColumnName("MoveToCellLayerNO")
                    .HasComment("转移储位层号");

                entity.Property(e => e.MoveToCellLineNo)
                    .HasColumnName("MoveToCellLineNO")
                    .HasComment("转移储位排号");

                entity.Property(e => e.MoveToCellName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("转移储位名称");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("垛号");

                entity.Property(e => e.RealHeightType).HasComment("垛实际高度类型");

                entity.Property(e => e.RefCellCode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.RelatedOrderDetailId).HasComment("订单Id");

                entity.Property(e => e.StackingStorageId).HasComment("组垛Id");

                entity.Property(e => e.Status).HasComment("状态：0-转移中；1-已转移；2-返回中；3-已返回");
            });

            modelBuilder.Entity<TPath>(entity =>
            {
                entity.ToTable("t_Path");

                entity.HasComment("路径表");

                entity.Property(e => e.Id).HasComment("路径Id");

                entity.Property(e => e.DescAddr)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("目标地址");

                entity.Property(e => e.DescType)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("目标类型");

                entity.Property(e => e.DescWhId).HasComment("目标库房Id");

                entity.Property(e => e.Docks)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("停靠地址");

                entity.Property(e => e.SrcAddr)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("起始地址");

                entity.Property(e => e.SrcType)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("起始类型");

                entity.Property(e => e.SrcWhId).HasComment("库房Id");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((1))")
                    .HasComment("状态：0-禁用；1-启用");
            });

            modelBuilder.Entity<TPickingOrder>(entity =>
            {
                entity.ToTable("t_PickingOrder");

                entity.HasComment("下架单");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.BatchNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BatchNO")
                    .HasComment("批次号");

                entity.Property(e => e.BillType).HasComment("单据类型");

                entity.Property(e => e.Code)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("下架单号");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.DescAddress)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("目标地址");

                entity.Property(e => e.LocationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("仓位编码");

                entity.Property(e => e.LocationDepth).HasComment("仓位深度");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料号");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialKeyId).HasComment("物料关键字Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.OwnerId).HasComment("货主Id");

                entity.Property(e => e.OwnerName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货主名称");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("垛条码");

                entity.Property(e => e.Qty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("QTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("数量");

                entity.Property(e => e.RelatedOrderDetailId).HasComment("对应出库单明细Id");

                entity.Property(e => e.SourceType).HasComment("来源分类：1-入库；2-出库；3-移库；4-盘点");

                entity.Property(e => e.StackingStorageId).HasComment("垛存储信息Id");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((0))")
                    .HasComment("状态");

                entity.Property(e => e.WarehouseCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("客户");

                entity.Property(e => e.WarehouseName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库房");
            });

            modelBuilder.Entity<TPickingOrderDetail>(entity =>
            {
                entity.ToTable("t_PickingOrderDetail");

                entity.HasComment("下架单明细");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.MaterialBarcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料条码");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.OrderId).HasComment("上架单Id");

                entity.Property(e => e.PackBarcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("包装条码");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("垛条码");
            });

            modelBuilder.Entity<TPickingStationDataDetail>(entity =>
            {
                entity.ToTable("t_PickingStationDataDetail");

                entity.HasComment("拣选明细");

                entity.Property(e => e.Id).HasComment("主键Id");

                entity.Property(e => e.Barcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货品条码");

                entity.Property(e => e.BarcodeRange)
                    .HasMaxLength(60)
                    .IsUnicode(false);

                entity.Property(e => e.IsSelected).HasDefaultValueSql("((0))");

                entity.Property(e => e.IsSku).HasDefaultValueSql("((1))");

                entity.Property(e => e.PackageBarcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("包装条码");

                entity.Property(e => e.PickingStationDataId).HasComment("拣选Id");

                entity.Property(e => e.SkuNum).HasColumnType("decimal(18, 3)");

                entity.Property(e => e.StationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("站台编码");

                entity.Property(e => e.StationId).HasComment("站台Id");
            });

            modelBuilder.Entity<TPickingStationDatum>(entity =>
            {
                entity.ToTable("t_PickingStationData");

                entity.Property(e => e.Id).HasComment("拣选站台数据Id");

                entity.Property(e => e.BatchNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BatchNO")
                    .HasComment("批次号");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.FromLocationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("起始地址");

                entity.Property(e => e.FromLocationName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("起始地址名称");

                entity.Property(e => e.HasNotice).HasComment("是否已通知PDA");

                entity.Property(e => e.IsMultPallet).HasDefaultValueSql("((0))");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料编码");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.NoticeDate)
                    .HasColumnType("datetime")
                    .HasComment("通知时间");

                entity.Property(e => e.OrderSn)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("OrderSN")
                    .HasComment("出库单号");

                entity.Property(e => e.OwnerId).HasComment("货主Id");

                entity.Property(e => e.OwnerName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("货主");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("垛条码");

                entity.Property(e => e.PickingInInstructId).HasComment("拣选入库指令Id");

                entity.Property(e => e.PickingInTaskId).HasComment("拣选入库任务Id");

                entity.Property(e => e.PickingOutInstructId).HasComment("拣选出库指令Id");

                entity.Property(e => e.PickingOutTaskId).HasComment("拣选出库任务Id");

                entity.Property(e => e.PickingQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("PickingQTY")
                    .HasComment("拣选数量");

                entity.Property(e => e.RefInvIds)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.RelatedOrderDetailId).HasComment("出库单明细Id");

                entity.Property(e => e.RelatedOrderId).HasComment("出库单Id");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((1))")
                    .HasComment("状态：1-最新数据；0-过期数据");

                entity.Property(e => e.SupplierId).HasComment("供应商Id");

                entity.Property(e => e.SupplierName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("供应商");

                entity.Property(e => e.ToStationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("目的站台地址");

                entity.Property(e => e.ToStationId).HasComment("目的站台Id");

                entity.Property(e => e.ToStationName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("目的站台名称");

                entity.Property(e => e.TotalQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("TotalQTY")
                    .HasComment("当前库存总数");
            });

            modelBuilder.Entity<TPlatform>(entity =>
            {
                entity.ToTable("t_Platform");

                entity.Property(e => e.AddrFloor).HasComment("所在楼层");

                entity.Property(e => e.Code)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("月台编码");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.FunctionType).HasComment("功能类型：10-入库；20-出库；30-出入库");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改人");

                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("月台名称");

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.Status).HasComment("状态：0-禁用；1-正常");

                entity.Property(e => e.WhCode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("库房编码");

                entity.Property(e => e.WhId).HasComment("库房Id");

                entity.Property(e => e.WhName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库房名称");
            });

            modelBuilder.Entity<TPlatformSet>(entity =>
            {
                entity.ToTable("t_PlatformSet");

                entity.HasComment("系统设置");

                entity.Property(e => e.Id).HasComment("系统设置Id");

                entity.Property(e => e.AllotOutStationMode).HasDefaultValueSql("((1))");

                entity.Property(e => e.CollectNow).HasDefaultValueSql("((0))");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CurrMode)
                    .HasDefaultValueSql("((0))")
                    .HasComment("当前模式：0-无；1-入库模式；2-出库模式；3-盘点模式");

                entity.Property(e => e.HeavyMaterialTypeIds)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("重物料类型Id");

                entity.Property(e => e.IsGetAll).HasDefaultValueSql("((0))");

                entity.Property(e => e.IsPointSyncDate).HasDefaultValueSql("((0))");

                entity.Property(e => e.LightMaterialTypeIds)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("轻物料类型Id");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.PointSyncDate).HasColumnType("datetime");

                entity.Property(e => e.StrategyBusinessNameForIn)
                    .HasMaxLength(60)
                    .IsUnicode(false)
                    .HasComment("当前入库策略");

                entity.Property(e => e.StrategyBusinessNameForOut)
                    .HasMaxLength(60)
                    .IsUnicode(false)
                    .HasComment("当前出库策略");

                entity.Property(e => e.StrategyBusinessNameForStocktake)
                    .HasMaxLength(60)
                    .IsUnicode(false)
                    .HasComment("当前盘点策略");

                entity.Property(e => e.StrategyIdForIn).HasComment("当前入库策略Id");

                entity.Property(e => e.StrategyIdForOut).HasComment("当前出库策略Id");

                entity.Property(e => e.StrategyIdForStocktake).HasComment("当前盘点策略Id");

                entity.Property(e => e.WithYingXiao).HasDefaultValueSql("((0))");
            });

            modelBuilder.Entity<TPutawayOrder>(entity =>
            {
                entity.ToTable("t_PutawayOrder");

                entity.HasComment("上架单");

                entity.Property(e => e.Id).HasComment("上架单Id");

                entity.Property(e => e.BatchNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BatchNO")
                    .HasComment("批次号");

                entity.Property(e => e.BillType).HasComment("单据类型");

                entity.Property(e => e.Code)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("上架单号");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.Fifodate)
                    .HasColumnType("datetime")
                    .HasColumnName("FIFODate");

                entity.Property(e => e.LocationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("仓位编码");

                entity.Property(e => e.LocationDepth).HasComment("仓位深度");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料号");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialKeyId).HasComment("物料关键字Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.OwnerId).HasComment("货主Id");

                entity.Property(e => e.OwnerName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货主名称");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(128)
                    .IsUnicode(false)
                    .HasComment("垛条码");

                entity.Property(e => e.ParentPalletBarcode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Qty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("QTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("数量");

                entity.Property(e => e.RelatedOrderDetailId).HasComment("对应收货单明细Id");

                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.SourceType).HasComment("来源分类：1-入库；2-出库；3-移库；4-盘点");

                entity.Property(e => e.StackingStorageId).HasComment("垛存储信息Id");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((1))")
                    .HasComment("状态：1-创建；2-已确定；3-审核成功；4-上架中；5-已完成；");

                entity.Property(e => e.Volume).HasComment("体积");

                entity.Property(e => e.Weight).HasComment("重量");
            });

            modelBuilder.Entity<TPutawayOrderDetail>(entity =>
            {
                entity.ToTable("t_PutawayOrderDetail");

                entity.HasComment("上架单详情");

                entity.Property(e => e.Id).HasComment("上架单明细Id");

                entity.Property(e => e.MaterialBarcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料条码");

                entity.Property(e => e.PackageBarcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("包装条码号");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("垛条码");

                entity.Property(e => e.PutawayOrderId).HasComment("上架单Id");
            });

            modelBuilder.Entity<TReceivingBill>(entity =>
            {
                entity.ToTable("t_ReceivingBill");

                entity.HasComment("收货单");

                entity.Property(e => e.Id).HasComment("主键Id");

                entity.Property(e => e.BeginDate)
                    .HasColumnType("datetime")
                    .HasComment("开始时间");

                entity.Property(e => e.BillNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BillNO")
                    .HasComment("单号");

                entity.Property(e => e.CheckResult).HasDefaultValueSql("((1))");

                entity.Property(e => e.CheckType).HasDefaultValueSql("((1))");

                entity.Property(e => e.CheckedQty)
                    .HasColumnType("decimal(18, 5)")
                    .HasColumnName("CheckedQTY");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.EndDate)
                    .HasColumnType("datetime")
                    .HasComment("完成时间");

                entity.Property(e => e.IsCreatedChecklist).HasDefaultValueSql("((0))");

                entity.Property(e => e.Ngreason)
                    .HasMaxLength(200)
                    .HasColumnName("NGReason");

                entity.Property(e => e.Receiver)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("收货人");

                entity.Property(e => e.RefSn)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("RefSN")
                    .HasComment("关联单号");

                entity.Property(e => e.Status).HasComment("状态：0-未开始；1-未完成；2-已完成");

                entity.Property(e => e.StoLocation)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库存地点");

                entity.Property(e => e.SupplierId).HasComment("供应商Id");

                entity.Property(e => e.SupplierName)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("供应商名称");

                entity.Property(e => e.TotalCheckQty)
                    .HasColumnType("decimal(18, 5)")
                    .HasColumnName("TotalCheckQTY");

                entity.Property(e => e.TotalPrice).HasColumnType("decimal(12, 2)");

                entity.Property(e => e.TotalQty)
                    .HasColumnType("decimal(18, 5)")
                    .HasColumnName("TotalQTY");

                entity.Property(e => e.WarehouseCode)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.WarehouseName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<TReceivingBillDetail>(entity =>
            {
                entity.ToTable("t_ReceivingBillDetail");

                entity.HasComment("收货单明细");

                entity.Property(e => e.Id).HasComment("主键Id");

                entity.Property(e => e.BatchNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BatchNO");

                entity.Property(e => e.BatchNoExplain)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.BillId).HasComment("关联单Id");

                entity.Property(e => e.BillLineNo)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasColumnName("BillLineNO")
                    .HasComment("行号");

                entity.Property(e => e.BillNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BillNO")
                    .HasComment("关联单号");

                entity.Property(e => e.CheckedQty)
                    .HasColumnType("decimal(18, 5)")
                    .HasColumnName("CheckedQTY");

                entity.Property(e => e.ConfirmDate)
                    .HasColumnType("datetime")
                    .HasComment("确定时间");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.ExpireDate).HasColumnType("datetime");

                entity.Property(e => e.IsNeedQc)
                    .HasColumnName("IsNeedQC")
                    .HasDefaultValueSql("((0))");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料编码");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料描述");

                entity.Property(e => e.MaterialTypeCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("物料类型编码");

                entity.Property(e => e.MaterialTypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料类型名称");

                entity.Property(e => e.NeedCheckQty)
                    .HasColumnType("decimal(18, 5)")
                    .HasColumnName("NeedCheckQTY");

                entity.Property(e => e.OutFactoryDate).HasColumnType("datetime");

                entity.Property(e => e.OwnerName)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.Price).HasColumnType("decimal(12, 2)");

                entity.Property(e => e.ProduceFactory)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ProductDate).HasColumnType("datetime");

                entity.Property(e => e.PurchaseOrderNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("PurchaseOrderNO")
                    .HasComment("采购单号");

                entity.Property(e => e.Qty)
                    .HasColumnType("decimal(18, 5)")
                    .HasColumnName("QTY")
                    .HasComment("数量");

                entity.Property(e => e.ReceivedQty)
                    .HasColumnType("decimal(18, 5)")
                    .HasColumnName("ReceivedQTY")
                    .HasComment("收货数量");

                entity.Property(e => e.Status).HasComment("状态：0-未收货；1-已收货；");

                entity.Property(e => e.SupplierName)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.TotalPrice).HasColumnType("decimal(12, 2)");
            });

            modelBuilder.Entity<TReceivingGoodsDetail>(entity =>
            {
                entity.ToTable("t_ReceivingGoodsDetail");

                entity.HasComment("入库单货品明细");

                entity.Property(e => e.Id).HasComment("货品明细Id");

                entity.Property(e => e.Barcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货品条码");

                entity.Property(e => e.BarcodeRange)
                    .HasMaxLength(60)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.IsSku)
                    .IsRequired()
                    .HasDefaultValueSql("((1))");

                entity.Property(e => e.OrderDetailId).HasComment("订单详情Id");

                entity.Property(e => e.PackageBarcode)
                    .HasMaxLength(120)
                    .IsUnicode(false)
                    .HasComment("预期货品的最外侧包装条码");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(120)
                    .IsUnicode(false)
                    .HasComment("预期货品所在垛的条码");

                entity.Property(e => e.SkuNum)
                    .HasColumnType("decimal(18, 3)")
                    .HasDefaultValueSql("((0))");

                entity.Property(e => e.Status).HasComment("状态：0-未收货；1-已收货");

                entity.Property(e => e.WoodPalletBarcode)
                    .HasMaxLength(30)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<TReceivingOrderDetail>(entity =>
            {
                entity.ToTable("t_ReceivingOrderDetail");

                entity.HasComment("入库单明细");

                entity.Property(e => e.Id).HasComment("明细Id");

                entity.Property(e => e.AreaCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("库区编码");

                entity.Property(e => e.AreaName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库区名称");

                entity.Property(e => e.AuditDate)
                    .HasColumnType("datetime")
                    .HasComment("审核时间");

                entity.Property(e => e.AuditUserId).HasComment("审核人Id");

                entity.Property(e => e.AuditUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("审核人");

                entity.Property(e => e.BatchNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BatchNO")
                    .HasComment("批次号");

                entity.Property(e => e.BatchNoExplain)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.ContractNo)
                    .HasMaxLength(60)
                    .IsUnicode(false)
                    .HasColumnName("ContractNO")
                    .HasComment("合同号");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.DeptCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("部门编码");

                entity.Property(e => e.DeptName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("部门名称");

                entity.Property(e => e.Erpcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("ERPCode")
                    .HasComment("ERP物料号");

                entity.Property(e => e.ExpireDate)
                    .HasColumnType("datetime")
                    .HasComment("有效期");

                entity.Property(e => e.InStarDate)
                    .HasColumnType("datetime")
                    .HasComment("最早入库时间");

                entity.Property(e => e.LogicalPartCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("逻辑分区编码");

                entity.Property(e => e.LogicalPartName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("逻辑分区名称");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料号");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialImg)
                    .HasMaxLength(255)
                    .IsUnicode(false);

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.MaterialTypeCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("物料类型编码");

                entity.Property(e => e.MaterialTypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料类型");

                entity.Property(e => e.Mblnr)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("MBLNR")
                    .HasComment("物料凭证号");

                entity.Property(e => e.Mjahr)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("MJAHR")
                    .HasComment("物料凭证年度");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改人Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改人");

                entity.Property(e => e.OrderSn)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("OrderSN")
                    .HasComment("入库单编号");

                entity.Property(e => e.OutFactoryDate)
                    .HasColumnType("datetime")
                    .HasComment("出厂日期");

                entity.Property(e => e.OutOrderNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("OutOrderNO")
                    .HasComment("外协需求跟踪号");

                entity.Property(e => e.OwnerId).HasComment("货主Id");

                entity.Property(e => e.OwnerName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货主");

                entity.Property(e => e.PackQty)
                    .HasColumnName("PackQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("总包装数量");

                entity.Property(e => e.PackagedQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("PackagedQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("包装完成的数量");

                entity.Property(e => e.Price).HasColumnType("decimal(12, 2)");

                entity.Property(e => e.ProOrderNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("ProOrderNO")
                    .HasComment("生产订单号");

                entity.Property(e => e.ProduceFactory)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("生产厂家");

                entity.Property(e => e.ProductDate)
                    .HasColumnType("datetime")
                    .HasComment("生产日期");

                entity.Property(e => e.PurOrderLineNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("PurOrderLineNO")
                    .HasComment("采购订单行号");

                entity.Property(e => e.PurOrderLineType)
                    .HasDefaultValueSql("((0))")
                    .HasComment("采购订单行项目类型：0-无；1-L外协；2-U转储;3-正常采购");

                entity.Property(e => e.PurOrderNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("PurOrderNO")
                    .HasComment("采购订单号");

                entity.Property(e => e.Qadate)
                    .HasColumnType("datetime")
                    .HasColumnName("QADate")
                    .HasComment("质检日期");

                entity.Property(e => e.Qty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("QTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("期待数量：即订单数量，为基本单位的数量");

                entity.Property(e => e.QualityState)
                    .HasDefaultValueSql("((1))")
                    .HasComment("质量状态：0-待检；1-合格；2-不合格；");

                entity.Property(e => e.ReceivedQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("ReceivedQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("实际接收数量：为基本单位的数量");

                entity.Property(e => e.Remark)
                    .HasMaxLength(300)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.SourceType)
                    .HasDefaultValueSql("((0))")
                    .HasComment("单据来源类型：0-手动建单；1-ERP;2-MES;3-SAP");

                entity.Property(e => e.StackedQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("StackedQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("码垛完成的数量");

                entity.Property(e => e.Status).HasComment("状态：0-新建;1-已启动;2-作业中;3-已完成;4-强制完成;5-暂停;6-失效；7-异常");

                entity.Property(e => e.SubmitDate)
                    .HasColumnType("datetime")
                    .HasComment("提交时间");

                entity.Property(e => e.SubmitUserId).HasComment("提交人Id");

                entity.Property(e => e.SubmitUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("提交人");

                entity.Property(e => e.SupplierId).HasComment("供应商Id");

                entity.Property(e => e.SupplierName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("供应商");

                entity.Property(e => e.TotalPrice).HasColumnType("decimal(12, 2)");

                entity.Property(e => e.UnitId).HasComment("物料基本单位Id");

                entity.Property(e => e.UnitName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("物料基本单位");

                entity.Property(e => e.WarehouseCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("库房编码");

                entity.Property(e => e.WarehouseName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库房名称");

                entity.Property(e => e.Zeile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("ZEILE")
                    .HasComment("物料凭证行项目");
            });

            modelBuilder.Entity<TRole>(entity =>
            {
                entity.ToTable("t_Role");

                entity.HasComment("角色表");

                entity.Property(e => e.Id).HasComment("主键Id");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("创建人姓名");

                entity.Property(e => e.DisplayOrder).HasComment("排序编号");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("修改用户名称");

                entity.Property(e => e.Remark)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.RoleCode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("角色编码");

                entity.Property(e => e.RoleName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("角色名称");

                entity.Property(e => e.Status).HasComment("状态：0-禁用；1-正常");
            });

            modelBuilder.Entity<TRoleMenuAction>(entity =>
            {
                entity.ToTable("t_RoleMenuAction");

                entity.HasComment("角色菜单按钮权限表");

                entity.Property(e => e.Id).HasComment("主键Id");

                entity.Property(e => e.ActionId).HasComment("操作Id");

                entity.Property(e => e.IsMobile).HasComment("是否PDA端");

                entity.Property(e => e.MenuId).HasComment("菜单Id");

                entity.Property(e => e.RoleId).HasComment("角色Id");
            });

            modelBuilder.Entity<TRoleWarehouse>(entity =>
            {
                entity.ToTable("t_RoleWarehouse");

                entity.HasComment("仓库权限");

                entity.Property(e => e.Id).HasComment("自增Id");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("创建人姓名");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("修改用户名称");

                entity.Property(e => e.RoleId).HasComment("角色Id");

                entity.Property(e => e.WarehouseId).HasComment("仓库Id");
            });

            modelBuilder.Entity<TRouteway>(entity =>
            {
                entity.ToTable("t_Routeway");

                entity.HasComment("巷道");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.Code)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("巷道编码");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.DisplayOrder)
                    .HasDefaultValueSql("((1))")
                    .HasComment("排序号");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改人");

                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("巷道名称");

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.Status).HasDefaultValueSql("((1))");

                entity.Property(e => e.WhCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("库房编码");

                entity.Property(e => e.WhId).HasComment("库房Id");

                entity.Property(e => e.WhName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库房名称");
            });

            modelBuilder.Entity<TScannedPackageDetail>(entity =>
            {
                entity.ToTable("t_ScannedPackageDetail");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.ModifyDate).HasColumnType("datetime");

                entity.Property(e => e.OrderLineNo)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasColumnName("OrderLineNO");

                entity.Property(e => e.OrderNo)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasColumnName("OrderNO");

                entity.Property(e => e.PackageBarcode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Status).HasDefaultValueSql("((1))");
            });

            modelBuilder.Entity<TScheduledTask>(entity =>
            {
                entity.ToTable("t_ScheduledTask");

                entity.HasComment("定时任务");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.Data)
                    .HasMaxLength(1000)
                    .IsUnicode(false)
                    .HasComment("命令内容");

                entity.Property(e => e.FinishedDate)
                    .HasColumnType("datetime")
                    .HasComment("完成时间");

                entity.Property(e => e.Msg)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("描述");

                entity.Property(e => e.RecordId).HasComment("记录Id");

                entity.Property(e => e.RecordType).HasComment("记录类型");

                entity.Property(e => e.RefId).HasComment("关联Id");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((0))")
                    .HasComment("状态：-1-执行失败;0-待执行；1-执行中；2-已完成；");

                entity.Property(e => e.Title)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("名称");

                entity.Property(e => e.WarehouseCode)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.WarehouseName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<TShelf>(entity =>
            {
                entity.ToTable("t_Shelf");

                entity.HasComment("货架");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.AreaCode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("库区编码");

                entity.Property(e => e.AreaId).HasComment("库区Id");

                entity.Property(e => e.AreaName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("所属库区");

                entity.Property(e => e.CellCount).HasDefaultValueSql("((0))");

                entity.Property(e => e.Code)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("货架编码");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.Depth)
                    .HasDefaultValueSql("((1))")
                    .HasComment("深度，1：单深位，2：俩深位，3：三深位，4：四深位，5：五深位");

                entity.Property(e => e.DisabledCellCount).HasDefaultValueSql("((0))");

                entity.Property(e => e.DisplayOrder)
                    .HasDefaultValueSql("((1))")
                    .HasComment("排序号");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改人");

                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货架名称");

                entity.Property(e => e.Number).HasComment("货架号");

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.RoutewayId).HasComment("巷道Id");

                entity.Property(e => e.ShelfType)
                    .HasDefaultValueSql("((1))")
                    .HasComment("货架类型：1-轻型货架；2-重型货架");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((1))")
                    .HasComment("状态：0-禁用；1-正常");

                entity.Property(e => e.WhId).HasComment("库房Id");

                entity.Property(e => e.WhName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<TShippingGoodsDetail>(entity =>
            {
                entity.ToTable("t_ShippingGoodsDetail");

                entity.HasComment("出库单货品明细");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.Barcode)
                    .HasMaxLength(64)
                    .IsUnicode(false)
                    .HasComment("货物条码");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("创建日期");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料Sn");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.ModifyDate).HasColumnType("datetime");

                entity.Property(e => e.OrderDetailId).HasComment("出货明细表Id");

                entity.Property(e => e.PackageBarcode)
                    .HasMaxLength(60)
                    .IsUnicode(false)
                    .HasComment("预期箱条码");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("预期栈板条码");

                entity.Property(e => e.Status).HasComment("状态");
            });

            modelBuilder.Entity<TShippingLockCell>(entity =>
            {
                entity.ToTable("t_ShippingLockCell");

                entity.Property(e => e.Id).HasComment("主键Id");

                entity.Property(e => e.BatchNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BatchNO")
                    .HasComment("批次号");

                entity.Property(e => e.CellCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("仓位编码");

                entity.Property(e => e.CellDepthIndex).HasComment("仓位深度");

                entity.Property(e => e.CellId).HasComment("仓位Id");

                entity.Property(e => e.CellName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("仓位名称");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.InventoryId).HasComment("库存Id");

                entity.Property(e => e.InventoryQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasComment("库存数量");

                entity.Property(e => e.IsPicking)
                    .HasDefaultValueSql("((0))")
                    .HasComment("是否拣选");

                entity.Property(e => e.LockIndex).HasComment("序号");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料编码");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialKeyId).HasComment("物料批次Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.OrderDetailId).HasComment("出库单明细Id");

                entity.Property(e => e.OrderId).HasComment("出库单Id");

                entity.Property(e => e.OutQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasComment("出库数量");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(128)
                    .IsUnicode(false)
                    .HasComment("垛条码");

                entity.Property(e => e.ParentPalletBarcode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.StackingStorageId).HasComment("组垛Id");

                entity.Property(e => e.WhId).HasComment("库Id");
            });

            modelBuilder.Entity<TShippingOrderDetail>(entity =>
            {
                entity.ToTable("t_ShippingOrderDetail");

                entity.HasComment("出库单明细");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.AreaCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("库区编码");

                entity.Property(e => e.AreaName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库区名称");

                entity.Property(e => e.AuditDate)
                    .HasColumnType("datetime")
                    .HasComment("审核时间");

                entity.Property(e => e.AuditUserId).HasComment("审核人Id");

                entity.Property(e => e.AuditUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("审核人");

                entity.Property(e => e.BatchNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BatchNO")
                    .HasComment("批次号");

                entity.Property(e => e.ContractNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("ContractNO");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("创建日期");

                entity.Property(e => e.CreateUserId).HasComment("创建用户Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建用户名");

                entity.Property(e => e.DeptCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("部门编码");

                entity.Property(e => e.DeptName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("部门名称");

                entity.Property(e => e.DisOrderLineNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("DisOrderLineNO")
                    .HasComment("发货单行号");

                entity.Property(e => e.DisOrderNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("DisOrderNO")
                    .HasComment("发货单号");

                entity.Property(e => e.Erpcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("ERPCode");

                entity.Property(e => e.FinshDate)
                    .HasColumnType("date")
                    .HasComment("订单完成日期");

                entity.Property(e => e.IsMultPallet).HasDefaultValueSql("((0))");

                entity.Property(e => e.IsSuspend).HasDefaultValueSql("((0))");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料号，对应公共数据库中的物料主数据表,指定仓位出库的时候物料号允许为空");

                entity.Property(e => e.MaterialId).HasComment("物料ID");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.MaterialTypeCode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Mblnr)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("MBLNR")
                    .HasComment("物料凭证号");

                entity.Property(e => e.Mjahr)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("MJAHR")
                    .HasComment("物料凭证年度");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改日期");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户ID");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改用户");

                entity.Property(e => e.OnceOutGroupGuid).HasColumnName("OnceOutGroupGUID");

                entity.Property(e => e.OrderSn)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("OrderSN");

                entity.Property(e => e.OwnerId).HasComment("货主Id");

                entity.Property(e => e.OwnerName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货主");

                entity.Property(e => e.PackQty)
                    .HasColumnName("PackQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("包装数量");

                entity.Property(e => e.PickedQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("PickedQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("已经下架的数量");

                entity.Property(e => e.ProOrderNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("ProOrderNO")
                    .HasComment("生产订单号");

                entity.Property(e => e.ProduceFactory)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Proirity).HasComment("优先级:默认为0");

                entity.Property(e => e.PurOrderLineNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("PurOrderLineNO")
                    .HasComment("采购订单行号");

                entity.Property(e => e.PurOrderLineType)
                    .HasDefaultValueSql("((0))")
                    .HasComment("采购订单行项目类型：0-无；1-L外协；2-U转储;3-正常采购");

                entity.Property(e => e.PurOrderNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("PurOrderNO")
                    .HasComment("采购订单号");

                entity.Property(e => e.Qty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("QTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("预期出货数量");

                entity.Property(e => e.ShippedQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("ShippedQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("已经出库完成的数量");

                entity.Property(e => e.SourceType)
                    .HasDefaultValueSql("((0))")
                    .HasComment("单据来源类型：0-手动建单；1-ERP;2-MES;3-SAP");

                entity.Property(e => e.StationId).HasComment("出库站台Id");

                entity.Property(e => e.StationName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("预期出库站台或站台组");

                entity.Property(e => e.Status).HasComment("状态：0-新建;1-已启动;2-作业中;3-已完成;4-强制完成;5-暂停;6-失效；7-异常");

                entity.Property(e => e.SubmitDate)
                    .HasColumnType("datetime")
                    .HasComment("提交时间");

                entity.Property(e => e.SubmitUserId).HasComment("提交人Id");

                entity.Property(e => e.SubmitUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("提交人");

                entity.Property(e => e.SupplierName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.UnitId).HasComment("计量单位编号");

                entity.Property(e => e.UnitName)
                    .HasMaxLength(10)
                    .IsUnicode(false)
                    .HasComment("计量单位名称");

                entity.Property(e => e.WarehouseCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("库房编码");

                entity.Property(e => e.WarehouseName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库房名称");

                entity.Property(e => e.Zeile)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("ZEILE")
                    .HasComment("物料凭证行项目");
            });

            modelBuilder.Entity<TStackingStorage>(entity =>
            {
                entity.ToTable("t_StackingStorage");

                entity.HasComment("入库垛信息");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.AreaCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.AreaName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.BatchNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BatchNO")
                    .HasComment("批次号");

                entity.Property(e => e.BillType).HasComment("单据类型Id");

                entity.Property(e => e.CacheLocation)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.ExpectedLocation)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("预留分配的收货仓位");

                entity.Property(e => e.Fifodate)
                    .HasColumnType("datetime")
                    .HasColumnName("FIFODate")
                    .HasComment("先入先出日期时间");

                entity.Property(e => e.IsMultPallet).HasDefaultValueSql("((0))");

                entity.Property(e => e.LogicalPartCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("所属逻辑分区编号");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料编码");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialKeyId).HasComment("物料批次信息Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改人Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改人");

                entity.Property(e => e.PackQty)
                    .HasColumnName("PackQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("包装数量/箱数量");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(128)
                    .IsUnicode(false)
                    .HasComment("垛条码");

                entity.Property(e => e.ParentPalletBarcode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Qty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("QTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("货品数量");

                entity.Property(e => e.RelatedOrderDetailId).HasComment("关联单详情Id");

                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.Status).HasComment("状态：0-失效；1-生效；2-上架");

                entity.Property(e => e.SubTrayQty)
                    .HasColumnName("SubTrayQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("子托盘数，没有子托盘可以是0");

                entity.Property(e => e.TotalHeight).HasComment("垛总高：单位厘米");

                entity.Property(e => e.TotalLength).HasComment("垛总长：单位厘米");

                entity.Property(e => e.TotalVolume).HasComment("垛体积：单位立方厘米");

                entity.Property(e => e.TotalWeight)
                    .HasColumnType("decimal(18, 2)")
                    .HasComment("垛重量：单位千克");

                entity.Property(e => e.TotalWidth).HasComment("垛总宽：单位厘米");

                entity.Property(e => e.WarehouseCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.WarehouseName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库房名称");

                entity.Property(e => e.WoodPalletBarcode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.OrderNo)
                    .HasMaxLength(100)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<TStation>(entity =>
            {
                entity.ToTable("t_Station");

                entity.HasComment("站台");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.AddrFloor).HasComment("所在楼层");

                entity.Property(e => e.AreaId).HasComment("库区Id");

                entity.Property(e => e.AreaName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库区名称");

                entity.Property(e => e.Code)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("站台编码");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.DeviceCode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("设备编码");

                entity.Property(e => e.DisplayOrder)
                    .HasDefaultValueSql("((1))")
                    .HasComment("排序号");

                entity.Property(e => e.FunctionType).HasComment("功能类型：1-入库；2-出库；3-出入库；4-拣选；5-缓存");

                entity.Property(e => e.IsLock)
                    .HasDefaultValueSql("((0))")
                    .HasComment("是否锁定");

                entity.Property(e => e.Ledid)
                    .HasColumnName("LEDId")
                    .HasComment("关联LED设备Id");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改人");

                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("站台名称");

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.StationSort)
                    .HasDefaultValueSql("((1))")
                    .HasComment("站台分类：1-轻型；2-重型");

                entity.Property(e => e.StationType).HasDefaultValueSql("((1))");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((1))")
                    .HasComment("状态：0-禁用；1-正常");

                entity.Property(e => e.WhCode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("库房编码");

                entity.Property(e => e.WhId).HasComment("库房Id");

                entity.Property(e => e.WhName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库房名称");
            });

            modelBuilder.Entity<TStationDatum>(entity =>
            {
                entity.ToTable("t_StationData");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.Barcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料条码");

                entity.Property(e => e.BatchNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BatchNO")
                    .HasComment("批次号");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.FinishDate)
                    .HasColumnType("datetime")
                    .HasComment("放行时间");

                entity.Property(e => e.IsArrived).HasDefaultValueSql("((0))");

                entity.Property(e => e.IsPickIn).HasDefaultValueSql("((0))");

                entity.Property(e => e.IsStackFinished).HasDefaultValueSql("((0))");

                entity.Property(e => e.IsStocktake).HasDefaultValueSql("((0))");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialKeyId).HasComment("物料KeyID");

                entity.Property(e => e.PackageBarcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("包装条码");

                entity.Property(e => e.StationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("站台编码");

                entity.Property(e => e.StationId).HasComment("站台ID");

                entity.Property(e => e.Status).HasComment("状态：0-未到位；1-已到位未放行；2-已放行");
            });

            modelBuilder.Entity<TStationRouteway>(entity =>
            {
                entity.ToTable("t_StationRouteway");

                entity.HasComment("站台巷道关联表");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.RoutewayCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("巷道编码");

                entity.Property(e => e.RoutewayId).HasComment("巷道Id");

                entity.Property(e => e.StationCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("站台编码");

                entity.Property(e => e.StationId).HasComment("站台Id");

                entity.Property(e => e.WhId).HasComment("库房Id");
            });

            modelBuilder.Entity<TStocktakeGoodsDetail>(entity =>
            {
                entity.ToTable("t_StocktakeGoodsDetail");

                entity.Property(e => e.Barcode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())");

                entity.Property(e => e.PackageBarcode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(128)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<TStocktakeResultGoodsDetail>(entity =>
            {
                entity.ToTable("t_StocktakeResultGoodsDetail");

                entity.Property(e => e.Barcode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.IsSku).HasDefaultValueSql("((0))");

                entity.Property(e => e.PackageBarcode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.SkuNum).HasColumnType("decimal(18, 3)");
            });

            modelBuilder.Entity<TStocktakeResultRecord>(entity =>
            {
                entity.ToTable("t_StocktakeResultRecord");

                entity.Property(e => e.Id).HasComment("盘点记录Id");

                entity.Property(e => e.AreaId).HasComment("库区Id");

                entity.Property(e => e.AreaName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库区");

                entity.Property(e => e.BillTypeId).HasComment("单据类型Id");

                entity.Property(e => e.BillTypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("单据类型");

                entity.Property(e => e.CellCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("仓位编码");

                entity.Property(e => e.CellDepthIndex).HasComment("仓位深度");

                entity.Property(e => e.CellId).HasComment("仓位Id");

                entity.Property(e => e.CountQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("CountQTY")
                    .HasComment("盘点后数量");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.IsHandle).HasComment("是否已处理");

                entity.Property(e => e.MaterialBarcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料条码");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.OrderId).HasComment("订单Id");

                entity.Property(e => e.OrderSn)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("OrderSN")
                    .HasComment("订单编码");

                entity.Property(e => e.OriginalQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("OriginalQTY")
                    .HasComment("原始数量");

                entity.Property(e => e.PackageBarcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("包装条码：如料箱条码。整垛盘点为空（不拆箱盘点），否则不允许为空");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("垛条码");

                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.ScanBarcode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("扫描条码");

                entity.Property(e => e.Status).HasComment("盘点结果状态:1-盘平;2-盘盈;3-盘亏;");

                entity.Property(e => e.UnitId).HasComment("盘点单位Id");

                entity.Property(e => e.UnitName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("盘点单位：通常为物料的基本单位");

                entity.Property(e => e.WarehouseId).HasComment("库房Id");

                entity.Property(e => e.WarehouseName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库房");
            });

            modelBuilder.Entity<TStocktakingOrder>(entity =>
            {
                entity.ToTable("t_StocktakingOrder");

                entity.HasComment("盘点单");

                entity.Property(e => e.Id).HasComment("盘点订单Id");

                entity.Property(e => e.AreaCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.AreaId).HasComment("库区Id");

                entity.Property(e => e.AreaName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库区");

                entity.Property(e => e.AuditDate)
                    .HasColumnType("datetime")
                    .HasComment("审核时间");

                entity.Property(e => e.AuditUserId).HasComment("审核人Id");

                entity.Property(e => e.AuditUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("审核人");

                entity.Property(e => e.BatchNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BatchNO")
                    .HasComment("批次号");

                entity.Property(e => e.BillType).HasComment("单据类型Id");

                entity.Property(e => e.CellCount).HasComment("库位数量");

                entity.Property(e => e.CompanyId).HasComment("公司Id");

                entity.Property(e => e.CompanyName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("公司名称");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.Erpcode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasColumnName("ERPCode")
                    .HasComment("ERP单据类型编码");

                entity.Property(e => e.ExecDate)
                    .HasColumnType("datetime")
                    .HasComment("盘点执行时间");

                entity.Property(e => e.FinishedCount).HasComment("完成数量");

                entity.Property(e => e.Granularity)
                    .HasDefaultValueSql("((0))")
                    .HasComment("盘点粒度：0-全部盘点；10-抽查盘点（5%库位）；20-抽查盘点（25%库位）；30-抽查盘点（50%库位）\r\n");

                entity.Property(e => e.LoopTimes).HasComment("循环次数");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.MaxLocationCount)
                    .HasDefaultValueSql("((0))")
                    .HasComment("单盘最大库位数");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改人Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改人");

                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("名称");

                entity.Property(e => e.OrderSn)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("OrderSN")
                    .HasComment("订单号");

                entity.Property(e => e.PlanType)
                    .HasDefaultValueSql("((10))")
                    .HasComment("盘点计划：10-普通抽盘；20-临时抽盘；30-紧急抽盘；40-货主抽盘；50-库区抽盘；");

                entity.Property(e => e.PriorityLevel)
                    .HasDefaultValueSql("((1))")
                    .HasComment("优先级");

                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.Status).HasComment("单据状态：0-创建;1-提交;2-审核通过;3-作业中；4-已完成;5-强制完成;6-失效；7-异常");

                entity.Property(e => e.StocktakeWay).HasComment("盘点方法：0-全部盘点；10-不盘30天已盘点的库区；20-不盘15天已盘点的库区；30-不盘7天内已盘点的库区；");

                entity.Property(e => e.SubmitDate)
                    .HasColumnType("datetime")
                    .HasComment("提交时间");

                entity.Property(e => e.SubmitUserId).HasComment("提交人Id");

                entity.Property(e => e.SubmitUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("提交人");

                entity.Property(e => e.TouchEndDate).HasColumnType("datetime");

                entity.Property(e => e.TouchStartDate).HasColumnType("datetime");

                entity.Property(e => e.TouchTimes)
                    .HasDefaultValueSql("((0))")
                    .HasComment("动碰次数");

                entity.Property(e => e.WarehouseCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.WarehouseId).HasComment("库房Id");

                entity.Property(e => e.WarehouseName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库房");
            });

            modelBuilder.Entity<TStocktakingOrderDetail>(entity =>
            {
                entity.ToTable("t_StocktakingOrderDetail");

                entity.HasComment("盘点明细");

                entity.Property(e => e.Id).HasComment("订单明细主键");

                entity.Property(e => e.BatchNo)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BatchNO");

                entity.Property(e => e.CellCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("仓位编码");

                entity.Property(e => e.CellId).HasComment("仓位Id");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.ExpectedStationIds)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("预期站台");

                entity.Property(e => e.ExpireDate)
                    .HasColumnType("datetime")
                    .HasComment("有效时间");

                entity.Property(e => e.HasSkuDetail)
                    .HasDefaultValueSql("((0))")
                    .HasComment("是否有货号详情");

                entity.Property(e => e.IsNeedMove).HasDefaultValueSql("((0))");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料号");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.MaterialTypeId).HasComment("物料类型Id");

                entity.Property(e => e.MaterialTypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料类型");

                entity.Property(e => e.OrderId).HasComment("盘点单Id");

                entity.Property(e => e.OrderSn)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("OrderSN")
                    .HasComment("盘点单号");

                entity.Property(e => e.OwnerId).HasComment("货主Id");

                entity.Property(e => e.OwnerName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货主");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(128)
                    .IsUnicode(false)
                    .HasComment("垛条码");

                entity.Property(e => e.ProductDate)
                    .HasColumnType("datetime")
                    .HasComment("生产日期");

                entity.Property(e => e.Qty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("QTY")
                    .HasComment("数量");

                entity.Property(e => e.QualityState)
                    .HasDefaultValueSql("((1))")
                    .HasComment("质量状态：0-待检；1-合格；2-不合格；");

                entity.Property(e => e.Status).HasComment("状态：0-创建、1-进行中、2-完成、3-已取消");

                entity.Property(e => e.Step)
                    .HasDefaultValueSql("((0))")
                    .HasComment("当前步骤：0-未执行；1-出进行中；2-出完成；3-入进行中；4-入完成");

                entity.Property(e => e.SupplierId).HasComment("供应商Id");

                entity.Property(e => e.SupplierName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("供应商");
            });

            modelBuilder.Entity<TStocktakingPlan>(entity =>
            {
                entity.ToTable("t_StocktakingPlan");

                entity.Property(e => e.AreaId).HasComment("库区Id");

                entity.Property(e => e.AreaName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库区\r\n");

                entity.Property(e => e.BeginDate)
                    .HasColumnType("datetime")
                    .HasComment("盘点计划开始时间");

                entity.Property(e => e.BillSn)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BillSN")
                    .HasComment("计划单号");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建人");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.EndDate)
                    .HasColumnType("datetime")
                    .HasComment("盘点计划结束时间");

                entity.Property(e => e.GoodsAbc)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasColumnName("GoodsABC")
                    .HasComment("货品ABC流通选项：0-A;1-B;2-C；可多选，逗号隔开");

                entity.Property(e => e.GoodsIds)
                    .HasMaxLength(1000)
                    .IsUnicode(false)
                    .HasComment("指定货品Id,多个逗号隔开");

                entity.Property(e => e.GoodsNames)
                    .HasMaxLength(3000)
                    .HasComment("指定货品名称");

                entity.Property(e => e.Granularity)
                    .HasDefaultValueSql("((0))")
                    .HasComment("盘点粒度：0-全部盘点；10-抽查盘点（5%库位）；20-抽查盘点（25%库位）；30-抽查盘点（50%库位）");

                entity.Property(e => e.MaxLocationCount).HasComment("单盘最大库位数\r\n");

                entity.Property(e => e.Means).HasComment("盘点工具：10-机器盘点；20-PDA；30-纸质；40-自定义；\r\n");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改人");

                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("计划名称");

                entity.Property(e => e.OwnerId).HasComment("货主Id");

                entity.Property(e => e.OwnerName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货主");

                entity.Property(e => e.PlanType).HasComment("盘点计划：10-普通抽盘；20-临时抽盘；30-紧急抽盘；40-货主抽盘；50-库区抽盘；\r\n");

                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.Repeat)
                    .HasDefaultValueSql("((0))")
                    .HasComment("重复盘点：0-全部盘点；10-不盘30天已盘点的库区；20-不盘15天已盘点的库区；30-不盘7天内已盘点的库区；");

                entity.Property(e => e.Status).HasComment("状态：0-新建;10-已审核;20-已生成盘点单；30-取消作废；");

                entity.Property(e => e.WarehouseId).HasComment("库房Id");

                entity.Property(e => e.WarehouseName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库房");
            });

            modelBuilder.Entity<TStocktakingStrategy>(entity =>
            {
                entity.ToTable("t_StocktakingStrategy");

                entity.Property(e => e.AreaId).HasComment("库区Id");

                entity.Property(e => e.AreaName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库区\r\n");

                entity.Property(e => e.BillSn)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("BillSN")
                    .HasComment("计划单号");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建人");

                entity.Property(e => e.EffectBeginDate)
                    .HasColumnType("datetime")
                    .HasComment("策略生效开始时间");

                entity.Property(e => e.EffectEndDate)
                    .HasColumnType("datetime")
                    .HasComment("策略生效结束时间");

                entity.Property(e => e.ExecCycle).HasComment("周期:0-每天执行一次；10-每7天执行一次；20-每15天执行一次；30-每月执行一次；");

                entity.Property(e => e.FirstExecBeginDate)
                    .HasColumnType("datetime")
                    .HasComment("计划第一次执行开始时间");

                entity.Property(e => e.FirstExecEndDate)
                    .HasColumnType("datetime")
                    .HasComment("计划第一次执行结束时间");

                entity.Property(e => e.GoodsAbc)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasColumnName("GoodsABC")
                    .HasComment("货品ABC流通选项：0-A;1-B;2-C；可多选，逗号隔开");

                entity.Property(e => e.GoodsIds)
                    .HasMaxLength(1000)
                    .IsUnicode(false)
                    .HasComment("指定货品Id,多个逗号隔开");

                entity.Property(e => e.GoodsNames)
                    .HasMaxLength(3000)
                    .HasComment("指定货品名称");

                entity.Property(e => e.Granularity)
                    .HasDefaultValueSql("((0))")
                    .HasComment("盘点粒度：0-全部盘点；10-抽查盘点（5%库位）；20-抽查盘点（25%库位）；30-抽查盘点（50%库位）");

                entity.Property(e => e.MaxLocationCount).HasComment("单盘最大库位数\r\n");

                entity.Property(e => e.Means).HasComment("盘点工具：10-机器盘点；20-PDA；30-纸质；40-自定义；\r\n");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改人");

                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("策略名称");

                entity.Property(e => e.OwnerId).HasComment("货主Id");

                entity.Property(e => e.OwnerName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("货主");

                entity.Property(e => e.PlanType).HasComment("盘点计划：10-普通抽盘；20-临时抽盘；30-紧急抽盘；40-货主抽盘；50-库区抽盘；\r\n");

                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.Repeat)
                    .HasDefaultValueSql("((0))")
                    .HasComment("重复盘点：0-全部盘点；10-不盘30天已盘点的库区；20-不盘15天已盘点的库区；30-不盘7天内已盘点的库区；");

                entity.Property(e => e.Status).HasComment("状态：1-启用；0-禁用；");

                entity.Property(e => e.WarehouseId).HasComment("库房Id");

                entity.Property(e => e.WarehouseName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库房");
            });

            modelBuilder.Entity<TStrategy>(entity =>
            {
                entity.ToTable("t_Strategy");

                entity.HasComment("策略表");

                entity.Property(e => e.Id).HasComment("策略Id");

                entity.Property(e => e.BusinessClassName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("业务类");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.DisplayOrder)
                    .HasDefaultValueSql("((1))")
                    .HasComment("序号");

                entity.Property(e => e.IsEnable)
                    .IsRequired()
                    .HasDefaultValueSql("((1))")
                    .HasComment("是否启用");

                entity.Property(e => e.IsUsed).HasComment("是否当前在应用");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("策略名称");

                entity.Property(e => e.StrategyType)
                    .HasDefaultValueSql("((1))")
                    .HasComment("策略类型：1-入库策略；2-出库策略");
            });

            modelBuilder.Entity<TSupplier>(entity =>
            {
                entity.ToTable("t_Supplier");

                entity.HasComment("供货商");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.AddrDetail)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("供应商地址");

                entity.Property(e => e.Code)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("供应商编码");

                entity.Property(e => e.Contact)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人");

                entity.Property(e => e.Contact1)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人1");

                entity.Property(e => e.Contact1Mobile)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("联系人1电话");

                entity.Property(e => e.ContactMobile)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("联系电话");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建用户Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建用户名");

                entity.Property(e => e.DisplayOrder)
                    .HasDefaultValueSql("((1))")
                    .HasComment("排序号");

                entity.Property(e => e.Email)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("邮箱");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("创建用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建用户名称");

                entity.Property(e => e.Name)
                    .HasMaxLength(60)
                    .IsUnicode(false)
                    .HasComment("供应商名称");

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.TypeId).HasComment("分类Id:对应字典项Id");

                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("分类名称：对应字典项名称");
            });

            modelBuilder.Entity<TTaskManage>(entity =>
            {
                entity.ToTable("t_TaskManage");

                entity.Property(e => e.BarCode)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasColumnName("barCode");

                entity.Property(e => e.BatchNo)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasColumnName("batchNo");

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Endnode)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasColumnName("endnode");

                entity.Property(e => e.Endseat)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasColumnName("endseat");

                entity.Property(e => e.Startnode)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasColumnName("startnode");

                entity.Property(e => e.Startseat)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasColumnName("startseat");

                entity.Property(e => e.Sturat).HasColumnName("sturat");

                entity.Property(e => e.Suppliesname)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasColumnName("suppliesname");

                entity.Property(e => e.Suppliesnode)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasColumnName("suppliesnode");

                entity.Property(e => e.Taskcode)
                    .HasMaxLength(150)
                    .IsUnicode(false);

                entity.Property(e => e.Tnode)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasColumnName("tnode");

                entity.Property(e => e.Typename)
                    .HasMaxLength(150)
                    .IsUnicode(false);

                entity.Property(e => e.Vessel)
                    .HasMaxLength(150)
                    .IsUnicode(false)
                    .HasColumnName("vessel");
            });

            modelBuilder.Entity<TTaskStock>(entity =>
            {
                entity.ToTable("t_TaskStock");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.Areanode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("库口");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.Stockcode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("盘点单编号");

                entity.Property(e => e.Sturat)
                    .HasColumnName("sturat")
                    .HasComment("任务状态  1 进行中 2完成 ");

                entity.Property(e => e.Suppliesname)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasColumnName("suppliesname")
                    .HasComment("物料名称");

                entity.Property(e => e.Suppliesnode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasColumnName("suppliesnode")
                    .HasComment("物料编号");
            });

            modelBuilder.Entity<TTaskStockDetail>(entity =>
            {
                entity.ToTable("t_TaskStockDetail");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.Areanode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("库口");

                entity.Property(e => e.BarCode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasColumnName("barCode")
                    .HasComment("托盘码");

                entity.Property(e => e.Cellcode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("仓位编号");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.Number).HasComment("数量");

                entity.Property(e => e.Stockcode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("盘点单编号");

                entity.Property(e => e.Sturat)
                    .HasColumnName("sturat")
                    .HasComment("状态 0未出 1盘点中 2完成");

                entity.Property(e => e.Suppliesname)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasColumnName("suppliesname")
                    .HasComment("物料名称");

                entity.Property(e => e.Suppliesnode)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasColumnName("suppliesnode")
                    .HasComment("物料编号");
            });

            modelBuilder.Entity<TTransferBinGoodsDetail>(entity =>
            {
                entity.ToTable("t_TransferBinGoodsDetail");

                entity.HasComment("移库物料明细");

                entity.Property(e => e.Id).HasComment("Id");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("创建时间");

                entity.Property(e => e.MaterialId).HasComment("物料ID");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.OrderDetailId).HasComment("移库明细ID");

                entity.Property(e => e.OrderId).HasComment("移库单Id");

                entity.Property(e => e.OrderSn)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("OrderSN")
                    .HasComment("移库单号");

                entity.Property(e => e.PackageBarcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物流外包装条码");

                entity.Property(e => e.PalletBarcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料堆放栈板条码");

                entity.Property(e => e.Remark)
                    .HasColumnType("text")
                    .HasComment("备注");

                entity.Property(e => e.Status).HasComment("物流状态");
            });

            modelBuilder.Entity<TTransferBinOrder>(entity =>
            {
                entity.ToTable("t_TransferBinOrder");

                entity.HasComment("移库单表");

                entity.Property(e => e.AuditDate)
                    .HasColumnType("datetime")
                    .HasComment("审核时间");

                entity.Property(e => e.AuditUserId).HasComment("审核人Id");

                entity.Property(e => e.AuditUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("审核人");

                entity.Property(e => e.BillType).HasComment("单据类型编号");

                entity.Property(e => e.CompanyId).HasComment("公司Id");

                entity.Property(e => e.CompanyName)
                    .HasMaxLength(128)
                    .IsUnicode(false)
                    .HasComment("公司名称");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("创建日期");

                entity.Property(e => e.CreateUserId).HasComment("创建人ID");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.Erpcode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("ERPCode")
                    .HasComment("客户单据号");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改人Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改人");

                entity.Property(e => e.OrderSn)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("OrderSN")
                    .HasComment("移库订单编号：Move+年月+00001");

                entity.Property(e => e.Proirity).HasComment("优先级:默认为0");

                entity.Property(e => e.Reason)
                    .HasColumnType("text")
                    .HasComment("调整原因");

                entity.Property(e => e.Remark)
                    .HasColumnType("text")
                    .HasComment("备注");

                entity.Property(e => e.SourceType).HasComment("来源类型:默认为1(手动建单)，对应中间库的表T_BD_BillSource");

                entity.Property(e => e.Status).HasComment("单据状态：0-创建;1-提交;2-审核通过;3-作业中；4-已完成;5-强制完成;6-失效；7-异常");

                entity.Property(e => e.SubmitDate)
                    .HasColumnType("datetime")
                    .HasComment("提交时间");

                entity.Property(e => e.SubmitUserId).HasComment("提交人Id");

                entity.Property(e => e.SubmitUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("提交人");
            });

            modelBuilder.Entity<TTransferBinOrderDetail>(entity =>
            {
                entity.ToTable("t_TransferBinOrderDetail");

                entity.HasComment("移库单明细");

                entity.Property(e => e.ActualStackingQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("ActualStackingQTY")
                    .HasComment("实际完成移库的垛数:立库会存在无法移库的情况，平库不存在");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人ID");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.ExceptionCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("移库订单执行的异常编码");

                entity.Property(e => e.ExceptionText)
                    .HasColumnType("text")
                    .HasComment("移库订单执行的异常文本");

                entity.Property(e => e.ExpectedStackingQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("ExpectedStackingQTY")
                    .HasComment("期望移库的垛数:立库必须整垛移库");

                entity.Property(e => e.FromLocationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("移库前仓位编码");

                entity.Property(e => e.FromLocationId).HasComment("移库前库位ID");

                entity.Property(e => e.FromLocationName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("移库前库位名称");

                entity.Property(e => e.FromRegionCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("移库前逻辑分区：为逻辑分区编码，对应中间库T_SM_Region表的主键");

                entity.Property(e => e.FromRegionId).HasComment("移库前库房区域ID");

                entity.Property(e => e.FromRegionName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("移库前库房区域名称");

                entity.Property(e => e.FromWhCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("移库前库房编码");

                entity.Property(e => e.FromWhId).HasComment("移库前库房Id");

                entity.Property(e => e.FromWhName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("移库前库房名称");

                entity.Property(e => e.IsFullStackingProirity).HasComment("是否满垛优先移库:Y优先满垛移库、N优先不满垛移库");

                entity.Property(e => e.IsPriorityFilling).HasDefaultValueSql("((0))");

                entity.Property(e => e.MaterialId).HasComment("物流ID");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改人ID");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改人");

                entity.Property(e => e.OrderId).HasComment("移库单表Id");

                entity.Property(e => e.OrderSn)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("移库单编号");

                entity.Property(e => e.Quantity).HasComment("调仓货品数量:立库则是该垛下物料总数量，平库则是人工需要拣货移库的数量（不一定是整箱移）");

                entity.Property(e => e.Remark)
                    .HasColumnType("text")
                    .HasComment("备注");

                entity.Property(e => e.Status).HasComment("单据状态：0-创建;1-提交;2-审核通过;3-作业中；4-已完成;5-强制完成;6-失效；7-异常");

                entity.Property(e => e.ToLocationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("移库后仓位编码");

                entity.Property(e => e.ToLocationId).HasComment("移库后库位ID");

                entity.Property(e => e.ToLocationName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("移库后库位名称");

                entity.Property(e => e.ToLogicalPartCode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ToRegionCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("移库后逻辑分区：为逻辑分区编码");

                entity.Property(e => e.ToRegionId).HasComment("移库后库房区域ID");

                entity.Property(e => e.ToRegionName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("移库后库房区域名称");

                entity.Property(e => e.ToWhCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("移库后库房编码");

                entity.Property(e => e.ToWhId).HasComment("移库后库房ID");

                entity.Property(e => e.ToWhName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("移库后库房名称");
            });

            modelBuilder.Entity<TUnitConvertFigre>(entity =>
            {
                entity.ToTable("t_UnitConvertFigre");

                entity.HasComment("物料的计量单位转换");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.BaseUnitId).HasComment("基本单位Id");

                entity.Property(e => e.BaseUnitName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("基本单位");

                entity.Property(e => e.Denominator)
                    .HasDefaultValueSql("((1))")
                    .HasComment("转换为基本计量单位的分母 ，默认值为1");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("物料编码");

                entity.Property(e => e.MaterialId).HasComment("物料Id");

                entity.Property(e => e.MaterialName)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("物料名称");

                entity.Property(e => e.Numerator).HasComment("转换分子");

                entity.Property(e => e.UnitId).HasComment("包装单位ID");

                entity.Property(e => e.UnitName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("包装单位");
            });

            modelBuilder.Entity<TUnstackDatum>(entity =>
            {
                entity.ToTable("t_UnstackData");

                entity.Property(e => e.Id).HasComment("ID");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("生成日期");

                entity.Property(e => e.MaterialCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("物料编码");

                entity.Property(e => e.OrderDetailId).HasComment("单据明细ID");

                entity.Property(e => e.OrderId).HasComment("单据ID");

                entity.Property(e => e.PackageCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("箱条码");

                entity.Property(e => e.StationCode)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("站点代码");

                entity.Property(e => e.UnstackType).HasComment("拆盘类型：0-整箱出库；1-拣选出库；");
            });

            modelBuilder.Entity<TUser>(entity =>
            {
                entity.ToTable("t_User");

                entity.HasComment("用户表");

                entity.Property(e => e.Id).HasComment("主键Id");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建用户Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("创建用户名");

                entity.Property(e => e.Email)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("邮箱");

                entity.Property(e => e.Gender).HasComment("性别：1-男；2-女");

                entity.Property(e => e.HeadShot)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("头像");

                entity.Property(e => e.JobNo)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasColumnName("JobNO");

                entity.Property(e => e.MobilePhone)
                    .HasMaxLength(11)
                    .IsUnicode(false)
                    .HasComment("手机号");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("修改用户名");

                entity.Property(e => e.Pwd)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("密码");

                entity.Property(e => e.RealName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("真实姓名");

                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.Signature)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Status).HasComment("状态");

                entity.Property(e => e.UserName)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasComment("用户名");

                entity.Property(e => e.UserSecret)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<TUserRole>(entity =>
            {
                entity.ToTable("t_UserRole");

                entity.HasComment("用户角色表");

                entity.Property(e => e.Id).HasComment("用户角色Id");

                entity.Property(e => e.RoleId).HasComment("角色Id");

                entity.Property(e => e.UserId).HasComment("用户Id");
            });

            modelBuilder.Entity<TWarehouse>(entity =>
            {
                entity.ToTable("t_Warehouse");

                entity.HasComment("库房");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.AddrDetail)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasComment("地址");

                entity.Property(e => e.AreaCount).HasDefaultValueSql("((0))");

                entity.Property(e => e.BuiltArea)
                    .HasColumnType("decimal(18, 2)")
                    .HasComment("库房面积");

                entity.Property(e => e.Code)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("库房编码");

                entity.Property(e => e.Contact)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("联系人");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("创建人");

                entity.Property(e => e.Erpcode)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasColumnName("ERPCode")
                    .HasComment("对应ERP系统的库房编码");

                entity.Property(e => e.MapCode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.MobilePhone)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("联系电话");

                entity.Property(e => e.ModifyDate)
                    .HasColumnType("datetime")
                    .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId).HasComment("修改用户Id");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("修改人");

                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库房名称");

                entity.Property(e => e.Remark)
                    .HasMaxLength(500)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.RoutewayCount).HasDefaultValueSql("((0))");

                entity.Property(e => e.StationCount).HasDefaultValueSql("((0))");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((1))")
                    .HasComment("状态：0-禁用；1-正常");

                entity.Property(e => e.TypeId).HasComment("库房类型Id");

                entity.Property(e => e.TypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("库房类型名称");
            });

            modelBuilder.Entity<TWaveOrder>(entity =>
            {
                entity.ToTable("t_WaveOrder");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.EndTime).HasColumnType("datetime");

                entity.Property(e => e.ModifyDate).HasColumnType("datetime");

                entity.Property(e => e.ModifyUserName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.OrderSn)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasColumnName("OrderSN");

                entity.Property(e => e.StartTime).HasColumnType("datetime");

                entity.Property(e => e.Status).HasDefaultValueSql("((0))");
            });

            modelBuilder.Entity<TWorkDocument>(entity =>
            {
                entity.ToTable("t_WorkDocument");

                entity.HasComment("作业文档");

                entity.Property(e => e.Id).HasComment("作业文档Id");

                entity.Property(e => e.AllocateQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("AllocateQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("分配数量");

                entity.Property(e => e.BillTypeId).HasComment("单据类型Id");

                entity.Property(e => e.BillTypeName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("单据类型");

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())")
                    .HasComment("创建日期");

                entity.Property(e => e.EndTime)
                    .HasColumnType("datetime")
                    .HasComment("结束时间");

                entity.Property(e => e.ErpbillTypeCode)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasColumnName("ERPBillTypeCode")
                    .HasComment("外部ERP单据类型编码");

                entity.Property(e => e.PickedQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("PickedQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("下架完数量");

                entity.Property(e => e.PlanQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("PlanQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("计划数量");

                entity.Property(e => e.PrintTimes)
                    .HasDefaultValueSql("((0))")
                    .HasComment("打印次数");

                entity.Property(e => e.PutawayQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("PutawayQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("上架完数量");

                entity.Property(e => e.RelatedOrderId).HasComment("入库单Id");

                entity.Property(e => e.SortedQty)
                    .HasColumnType("decimal(18, 3)")
                    .HasColumnName("SortedQTY")
                    .HasDefaultValueSql("((0))")
                    .HasComment("已分拣数量，或配料的数量");

                entity.Property(e => e.StartTime)
                    .HasColumnType("datetime")
                    .HasComment("开始时间");

                entity.Property(e => e.Status)
                    .HasDefaultValueSql("((0))")
                    .HasComment("作业状态：0-待作业、1-作业中、2-已上架；3-已下架、4-已分拣；5-已完成");

                entity.Property(e => e.WhId).HasComment("库房Id");

                entity.Property(e => e.WorkLocation)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("工作地点，一般为出入库月台");
            });

            modelBuilder.Entity<Temp>(entity =>
            {
                entity.ToTable("temp");

                entity.HasComment("物料分类表");

                entity.Property(e => e.Id).ValueGeneratedNever();

                entity.Property(e => e.Code)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate)
                    .HasColumnType("datetime")
                    .HasComment("创建时间");

                entity.Property(e => e.CreateUserId).HasComment("创建人Id");

                entity.Property(e => e.CreateUserName)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("创建人姓名");

                entity.Property(e => e.Name)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("分类名称");

                entity.Property(e => e.Remark)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("备注");

                entity.Property(e => e.UpdateDate)
                    .HasColumnType("datetime")
                    .HasComment("更新时间");

                entity.Property(e => e.UpdateUserId).HasComment("更新人Id");

                entity.Property(e => e.UpdateUserName)
                    .HasMaxLength(20)
                    .IsUnicode(false)
                    .HasComment("更新人姓名");
            });

            modelBuilder.Entity<TStackingStorageDetail>(entity =>
            {
                entity.ToTable("t_StackingStorageDetail");

                entity.HasComment("组垛详情表");

                entity.HasKey(e => e.Id);

                entity.Property(e => e.OrderId)
                      .HasColumnType("int")
                      .HasComment("委托单Id");

                entity.Property(e => e.StackingId)
                   .HasColumnType("int")
                   .HasComment("组垛主Id");

                entity.Property(e => e.SampleId)
                   .HasColumnType("bigint")
                   .HasComment("试样Id");

                entity.Property(e => e.OrderNo)
                        .HasMaxLength(50)
                        .IsUnicode(false)
                        .HasComment("委托单号");

                entity.Property(e => e.SampleCode)
                       .HasMaxLength(50)
                       .IsUnicode(false)
                       .HasComment("物料Code");

                entity.Property(e => e.StackingSampleCount).HasColumnType("decimal(18, 13)");

                entity.Property(e => e.SampleName)
                     .HasMaxLength(200)
                     .IsUnicode(false)
                     .HasComment("物料名称");


            });

            modelBuilder.Entity<TQueceRecard>(entity =>
            {
                entity.ToTable("t_QueceRecard");

                entity.HasComment("排队记录表");


                entity.Property(e => e.Id).HasComment("主键");


                entity.Property(e => e.BillNO)
                .IsUnicode(false)
                .HasMaxLength(50)
                .HasComment("收货单号");




                entity.Property(e => e.Number)
               .IsUnicode(false)
                .HasMaxLength(50)
                .HasComment("排号");

                entity.Property(e => e.CounterNo)
                .IsUnicode(false)
                    .HasMaxLength(50)
                .HasComment("窗口号");



                entity.Property(e => e.DisplayStatus)
            
               .HasComment("显示状态");

                entity.Property(e => e.DisPlayDate)
               .HasColumnType("datetime")
               .HasComment("显示时间");


                entity.Property(e => e.CallStatus)
               
               .HasComment("呼叫状态");

                entity.Property(e => e.CallDate)
                  .HasColumnType("datetime")
               .HasComment("呼叫时间");

                entity.Property(e => e.Msg)
                .IsUnicode(false)
                .HasMaxLength(200)
                .HasComment("呼叫信息");

               

                entity.Property(e => e.CreateDate)
                .HasColumnType("datetime")
                .HasDefaultValueSql("(getdate())")
                .HasComment("创建时间");


                entity.Property(e => e.Status)
               .HasColumnType("int")
                .HasComment("状态");


            });


            modelBuilder.Entity<TCabinetCellTemp>(entity =>
            {
                entity.ToTable("t_CabinetCellTemp");

                entity.HasComment("实时分配窗格表");

                entity.Property(e => e.Id).HasComment("主键");

                entity.Property(e => e.Code)
                .IsUnicode(false)
                .HasMaxLength(50)
                .HasComment("编码");


                entity.Property(e => e.Name)
              .IsUnicode(false)
                .HasMaxLength(50)
                .HasComment("名称");


                entity.Property(e => e.CabinetLocationCode)
                .IsUnicode(false)
                .HasMaxLength(50)
                .HasComment("点位编码");

                entity.Property(e => e.CabinetLocationName)
              .IsUnicode(false)
              .HasMaxLength(50)
              .HasComment("点位名称");

                entity.Property(e => e.BoxLabel)
               .IsUnicode(false)
                   .HasMaxLength(50)
                .HasMaxLength(50)
                ;

                entity.Property(e => e.CabinetBoxId)
                .IsUnicode(false)
                .HasMaxLength(50)
                .HasComment("柜子格口id");

                entity.Property(e => e.CellSizeType)
               .HasColumnType("int")
               .HasComment("格口大小类型");

                entity.Property(e => e.TaskCode)
                .HasDefaultValueSql("(newid())")
               .HasComment("业务Id");

                entity.Property(e => e.Status)
               .HasColumnType("int")
               .HasComment("状态");

                entity.Property(e => e.CreateDate)
                 .HasColumnType("datetime")
                 .HasDefaultValueSql("(getdate())")
                 .HasComment("创建时间");

                entity.Property(e => e.CreateUserName)
                .IsUnicode(false)
                .HasMaxLength(50)
                  .HasComment("创建人");

                entity.Property(e => e.ModifyDate)
                 .HasColumnType("datetime")
                 .HasComment("修改时间");

                entity.Property(e => e.ModifyUserId)
                    .HasColumnType("int")
                 .HasComment("修改人Id");

                entity.Property(e => e.ModifyUserName)
                 .IsUnicode(false)
                .HasMaxLength(50)
                 .HasComment("修改人");
            });

            OnModelCreatingPartial(modelBuilder);
        }

        partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
    }
}
